crh1979 Posted June 10, 2015 Share Posted June 10, 2015 I have downloaded the entire auction application from Chapter 15. All my database connections work fine and my application does not throw any errors that I know of, but I cannot login to the site. I have tried different usernames and passwords, but none of them work. I keep getting the error message "The submitted values do not match what is on file" I did however comment out the call to the JavaScript file login.js which contains an AJAX call to another login.php located in the AJAX folder. this allowed me to receive a successful login message, so I know at the very least my application is connecting to the database and reading the username and password correctly. It appears something in the AJAX call to the PHP script is not working. I am using XAMPP and NetBeans. Could it be I need to use a certain version of PHP? I believe I am using 5.4 but I can double check. Any advice you can give would help Thanks Link to comment Share on other sites More sharing options...
Larry Posted June 11, 2015 Share Posted June 11, 2015 It's likely not the PHP version. I'd first make sure you're running this directly in a browser, not through NetBeans, to rule that out. Next, I'd walk the process back: confirm what values get submitted via Ajax, confirm what values are received by PHP, confirm the query being executed, confirm the query results by executing that query using another interface (e.g., the mysql command line client). 1 Link to comment Share on other sites More sharing options...
crh1979 Posted June 11, 2015 Author Share Posted June 11, 2015 Hi Larry, I got it working now. The problem was my mysqli_connect.php was in the web root directory, but the ajax/login.php script could not read it from there. Nor could any of the other php scripts in the ajax folder. I changed the path to be require('../../mysqli_connect.php'); instead of require('../mysqli_connect.php'); Surprisingly NetBeans built in Console did not show the error but FireBug in Mozilla did. NetBeans might not be the best IDE it seems. I have really enjoyed your books Larry. Thanks for everything. Chris Link to comment Share on other sites More sharing options...
Larry Posted June 12, 2015 Share Posted June 12, 2015 Awesome. I'm glad to hear it and thanks for letting us know. And thanks for the nice words! Link to comment Share on other sites More sharing options...
Recommended Posts