Jump to content

Taipan

Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Taipan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I figured it, the database field only had 16 characters allocated for it, it needed around 40. Now it works. :D
  2. Hi, 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:-[code]$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() )"; [/code] 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:- [code]$query = "SELECT customer_id, first_name FROM customers WHERE email = '$e' AND password = PASSWORD('$p')"; [/code] 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. Chris
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.