Jump to content

Connecting To The Database


jimgilbert

Recommended Posts

Hi all, I am a newbe and am working on a login routine. I cannot get connected to the database. I have tried several different names and things but I keep getting the same error:Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'agent99'@'localhost' (using password: YES) in /home/realesv3/public_html/theclienttracker/checklogin.php on line 12cannot connectThis is the code I have now:

<?phpob_start();$host="localhost"; // Host name$username="agent99"; // Mysql username$password="agent99"; // Mysql password$db_name="realesv3_sunday"; // Database name$tbl_name="members"; // Table name// Connect to server and select databse.mysqli_connect("$host", "$username", "$password")or die("cannot connect"); mysqli_select_db("$db_name")or die("cannot select DB");

Any ideas?Thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...