gponty Posted July 4, 2012 Share Posted July 4, 2012 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 More sharing options...
HartleySan Posted July 4, 2012 Share Posted July 4, 2012 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. 1 Link to comment Share on other sites More sharing options...
lupiya Posted November 12, 2012 Share Posted November 12, 2012 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 More sharing options...
Larry Posted November 12, 2012 Share Posted November 12, 2012 My guess is that the script can't find your MySQL connection include. You need to turn on display_errors so you know what the actual problem is. Link to comment Share on other sites More sharing options...
Recommended Posts