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
How to concatenate two strings in php?
Which is variable cost?
How to merge values of two arrays into a single array?
How to call a php function from another php file?
What is the difference between php and cakephp?
Is php procedural or oop?
What is url encoding and decoding in php?
Tell me what is needed to be able to use image function?
How long do php sessions last?
Is ruby on rails php?
How can we pass the variable through the navigation between the pages?
Is php a strongly typed language?
Explain me the difference between include and require?
What is mvc in php?
Which is better python or php?