How can we encrypt the username and password using PHP?
Answer Posted / zahid
$username = $conn->escape_string($_POST['usernmae]);
$password = $conn->escape_string($_POST['password]);
$sql ="SELECT usernmae,password,id from login where md5(usernmae)='$username' and md5(password)='$password';";
$row = $conn->query($sql);
if($row->num_rows >0){
echo "login success";
}
else{
echo "Invalid credentaisl";
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Do loops php?
Why php is sometimes called as embedded scripting language?
Is null in php?
Is learning php easy?
What sized websites have you worked on in the past?
How to check a key exist in an array?
How to add comments in php?
How to remove values saved in the current session?
What are the functions used in php?
What does isset() function?
How to randomly retrieve a value from an array?
Difference between mysql_connect and mysql_pconnect?
Which MySQL function would you use to select a database?
Differentiate between require and include?
How can we access the data sent through the url with the get method?