Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is sticky form in php?

911


What is print_r?

902


Explain about looping in PHP?

1071


What are the advantages of stored procedures?

1003


What is include in php?

961


How to convert the first character to upper case?

975


What are the string function in php?

977


Which function will suitably replace 'x' if the size of a file needs to be checked? $Size=x(filename);

995


What is namespace in php?

1027


Tell me what is the use of "ksort" in php?

998


What enctype is required for file uploads to work?

1032


What are the differences between GET and POST methods?

1078


How to take a substring from a given string in php?

908


What is polymorphism in php?

993


What is meant by variable variables in php?

1017