First of all, this is a list dedicated to php and POSTGRESQL, not Mysql. But because you are using php... It completely depends on how much security matters to you. For most purposes, the php function crypt( ) will do the job. It is pretty well covered by most of the php resources out there which is really where you should check first. Try the following: $encryptedPass = crypt($password, '.v'); This encrypts the string $password using the 2 character salt '.v' -you can change these characters as you like. AFAIK there is no way to decrypt this as such, so... - take user's login password and encrypt it using the same two character salt. - compare it against the encrypted password already stored in the database. If you need to more about this there are plenty of resources out there including php.net. And remember that in future this list is for POSTGRESQL users. There are other lists where you can post your mysql related questions. "ums san sankari" <umashankarit@xxxxxxxxxxxxxx> on 16/10/2001 22:16:13 Please respond to "ums san sankari" <umashankarit@xxxxxxxxxxxxxx> To: pgsql-php@xxxxxxxxxxxxxx cc: (bcc: Ben Westgarth/User/FaCS) Subject: [PHP] Encrypt given Data Greetings! Can u spent some times for me ?. I need the coding to encrypt the data given by the user and i have to store that details in mysql database.Send the coding as soon as possible.and also i have to decrypt the data -Uma ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Attachment:
att1.eml
Description: Binary data