Home > DeveloperSection > Interviews > How can we encrypt the username and password using PHP?

Posted on    April-29-2011 12:36 AM

 PHP PHP 
Ratings:
 2 Answer(s)
  1147  View(s)
Rate this:

Amit Singh

Total Post:565

Points:2825
Posted on    April-29-2011 12:00 AM

You can encrypt a password with the following Mysql>SET PASSWORD=PASSWORD("Password");

Amit Singh

Total Post:565

Points:2825
Posted on    April-29-2011 12:00 AM

You can use the MySQL PASSWORD() function to encrypt username and password. For example,
INSERT into user (password, ...) VALUES (PASSWORD($password”)), ...);

Don't want to miss updates? Please click the below button!

Follow MindStick