Interview Questions

How can we encrypt the username and password using PHP?

PHP Interview Questions and Answers


(Continued from previous question...)

How can we encrypt the username and password using PHP?

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

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

(Continued on next question...)

Other Interview Questions