Jump to content

Connecting To The Database


jimgilbert
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...