Encryption in MySQL and PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shubby27
    New Member
    • Jul 2007
    • 1

    #1

    Encryption in MySQL and PHP

    Hi I encrypted the passwords in MySQL by using this code and it worked but when used the passwords to login with a PHP website it didnt work. Could someone tell me what i am doin wrong?


    INSERT INTO `customer` (`custID`, `surname`, `forename`, `address`, `password`, `gender`, `birthdate`)
    VALUES
    (1111, 'Dhillon', 'Sharanjit', 'Newcastle', des_encrypt('Sh aDhil','somekey '), 'F', '1985-03-07'),
    (1112, 'Smith', 'Michael', 'London', des_encrypt('Mi cSmit','somekey '), 'M', '1972-05-28');
  • kovik
    Recognized Expert Top Contributor
    • Jun 2007
    • 1044

    #2
    Originally posted by Shubby27
    Could someone tell me what i am doin wrong?
    Until you have some idea what you are doing wrong, we have no idea what your asking.

    Be more specific.

    Comment

    • nathj
      Recognized Expert Contributor
      • May 2007
      • 937

      #3
      Hi Shuby27

      Welcome to TSDN!

      When the user supplied the login credentials do you encrypt the password to compare it against the encrypted data in the table?

      nathj

      Comment

      Working...