In an effort to learn something now that I'm done with school I decided to pick up PHP/MySQL. I use bluehost to host my portfolio but aside from that I feel like I'm not taking advantage of everything it has to offer. I ran into a nice snag when I tried to link PHP code to a database I created.
I followed these steps setting up the database: https://my.bluehost.com/cgi/help/6
Created a very simple 3 column table in the database.
Stripped down my code and eventually used the code they suggested
Yet I continue to get this error:
And can't for the life of me figure out the problem. It would be great if someone had advice or a solution.
I followed these steps setting up the database: https://my.bluehost.com/cgi/help/6
Created a very simple 3 column table in the database.
Stripped down my code and eventually used the code they suggested
Code:
<?php
$dbh=mysql_connect ("localhost", "dbadmin", "********")
or die ('I cannot connect to the database.');
mysql_select_db ("dbtest");
echo "connected to the database";
?>
Yet I continue to get this error:
Code:
[12-Jul-2012 02:11:04] PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user 'dbadmin'@'localhost' (using password: YES) in /home6/sharpcgi/public_html/learning/action.php on line 3