PHP Help - PHP md5 encryptions

//VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
// PHP Help - PHP md5 encryptions
//VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV

****************************************************************
Title : Md5 password
Usage : to use a one way encryption after login and saves into database
Programmer : Mohd Izzairi Yamin
*****************************************************************

<?

include_once”connections.php”;

$username=$_REQUEST[’username’];
$password=$_REQUEST[’password’];

$encrpt_pwd=md5($password);
// eg: 63a9f0ea7bb98050796b649e85481845 it will save in this encrypted format.

//eg: posting to an oracle Database. Its up to you what DB you are using.
$sql=”INSERT INTO AUTHENTICATION (USERNAME,PASSWORD)VALUES (’$USERNAME’,'$PASSWORD’)”;
$sql_rs=oraquery($sql);

//Note: If you want to do a password checking after login, you just need to reverse this process
//Note: Do a SQL select statement from the database and get the result and just match the result with the
// passed parameters that has been converted into md5, that will do the matching authentication.

?>


About this entry