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

How to concatenate two strings in php?

1064


Which is variable cost?

952


How to merge values of two arrays into a single array?

1007


How to call a php function from another php file?

967


What is the difference between php and cakephp?

992


Is php procedural or oop?

976


What is url encoding and decoding in php?

1086


Tell me what is needed to be able to use image function?

970


How long do php sessions last?

1043


Is ruby on rails php?

950


How can we pass the variable through the navigation between the pages?

977


Is php a strongly typed language?

1000


Explain me the difference between include and require?

919


What is mvc in php?

996


Which is better python or php?

992