metalhead41 Posted January 16, 2008 Share Posted January 16, 2008 Hi all, I've been following some tutorials here: www.php-mysql-tutorial.com On a couple of the tutorials now, eg. this one. The code all works, bar the download page where it doesn't display anything. I have tested this on a few computers runnig wamp with no joy. I then uploaded it to a linux server running apache, mysql and php, and it worked fine straight away. Have I missed a setting somewhere, in the way wamp handles certain code? Or is it a platform thing? Cheers, Dan Quote Link to comment Share on other sites More sharing options...
metalhead41 Posted January 17, 2008 Author Share Posted January 17, 2008 Ok, it was the enable_short_tags option in php.ini I'm having another problem however... I'm convinced this is going to be a setting in php.ini as well... database login Again, same thing, it works fine on the live server, but on my test bed it doesn't work. PHP is connecting to mysql. When I enter the username and password to login, I get the error incorrect username/password. $sql = "SELECT user_id FROM tbl_auth_user WHERE user_id = '$userId' AND user_password = PASSWORD('$password')"; If I were to change the AND to OR, and enter the username into the login page it logs in. (obviously not practical). In MySql the passwords are encrypted, I'm assuming that's why the PASSWORD bit is there. So from my deductions PHP isn't encrypting the password to be the same as what is stored in MySql. Any Ideas? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.