How to Encrypt password in PHP, i am using below code to insert data into database using PHP code and i am able to store new member data but now i just want to encrypt user password..
PHP Script::
<?php
$objConnect = mysql_connect("localhost","root","");
$objDB = mysql_select_db("allah);
$strPassword = $_POST["sPassword"];
$strName = $_POST["sName"];
/*** Insert ***/
$strSQL = "INSERT INTO member (Password,Name)
VALUES (
'".$strPassword."',
'".$strName."',
)
";
$objQuery = mysql_query($strSQL);
if(!$objQuery)
{
$arr['StatusID'] = "0";
$arr['Message'] = "Cannot save data!";
}
else
{
$arr['StatusID'] = "1";
$arr['Message'] = "Register Successfully!";
}
mysql_close($objConnect);
echo json_encode($arr);
?>