Just upraded from PHP 4.1.3 to 5.0.4. Using MySQL 4.1.12. All my code seems to be working fine apart from a logon script. The problem seems to be with the password() command in SQL queries.
The following code is used to put a password into the database:
$result = mysql_query("UPDATE admin SET password = password('$password') where username = '$username'");
and in another part of the application, the following code is used to check the password:
$result = mysql_query("select * from admin where username = '$username' and password = password('$password')");
The code worked perfectly in PHP 4.1.3 but doesn't work now with PHP 5.04. If I remove the password() from each line of code it works perfectly.
Has anyone else had a problem with password() in PHP 5.0.4? Any other suggestions?