I moved my website to a new server and now the password encoding doesn't work anymore. I am not sure if the new server has a different version of php. Can't think why this would not work anymore.
This is the code that enters the info into the database when someone registers:-
$query = "INSERT INTO customers ( first_name, last_name, email, street_name, city_name, state_name, post_code, country_name, phone_number, password, registration_date) VALUES ( '$fn', '$ln', '$e', '$sn', '$cn', '$st', '$pc', '$c', '$ph', PASSWORD('$p'), NOW() )";and when you try to log in this code is checking the email address and password, if there is a match it logs them in:-
$query = "SELECT customer_id, first_name FROM customers WHERE email = '$e' AND password = PASSWORD('$p')";
If I take out the PASSWORD() part and just enter in the password as '$p' then it works fine. If anyone has any ideas why this no longer works, I'd really appreciate the help.