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

Do loops php?

934


Why php is sometimes called as embedded scripting language?

897


Is null in php?

886


Is learning php easy?

948


What sized websites have you worked on in the past?

948


How to check a key exist in an array?

1017


How to add comments in php?

956


How to remove values saved in the current session?

969


What are the functions used in php?

984


What does isset() function?

906


How to randomly retrieve a value from an array?

1027


Difference between mysql_connect and mysql_pconnect?

914


Which MySQL function would you use to select a database?

1014


Differentiate between require and include?

921


How can we access the data sent through the url with the get method?

1125