Jump to content
Larry Ullman's Book Forums

Ch. 9 Retreiving Query Results -- Error On View_Users.Php


Recommended Posts

Hello. I have been going through each chapter of this book for a couple of days now, and i finally got stuck on "Retrieving Query Results" in CH. 9. I created both the "register.php" page and the "view_users.php" page exactly how the book said to. Unfortunately when I fill out the registration form I get this error:

 

Could not connect to MySQL: Access denied for user 'username'@'localhost' (using password: YES)

 

 

And when I click on the View Users page that I created it gives me the same error, which is:

 

Could not connect to MySQL: Access denied for user 'username'@'localhost' (using password: YES)

 

 

I am assuming that something is wrong with MYSQL, but i do not really understand I already went through all of the steps to create my MYSQL passsword. And I was able to create all of the chapters prior to CH> 9 successfully. I even followed the examples where i Tested out the 'mysqli_connect.php' document, and it worked perfectly. I am not reallly sure what else to do considering I already ran the test, and created my password a while ago. Please help.

Link to comment
Share on other sites

Your logon credentials for the DB are wrong. In other words, the arguments in the mysqli_connect function are wrong.

 

If you're using a real server, verify the information with your hosting service.

If you're using XAMPP, for example, make sure that both your virtual Apache server and MySQL server are running.

  • Upvote 1
Link to comment
Share on other sites

  • 4 months later...

My problem is a different one, but it's also on the same exercise on retrieving errors. I am connected to the data base and I have done the exercise on pages 282 and 283 , i.e. trying to retrieve the query results, yet I am getting a blank page when I view it in browsers: safari, firefox, chrome, opera (sorry Have no IE). Anyone who has done this exercise and ready to help with a solution?

Link to comment
Share on other sites

 Share

×
×
  • Create New...