Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 423

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 423

Warning: Cannot modify header information - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 426

Warning: Cannot modify header information - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/templates/ja_purity/ja_templatetools.php on line 49
Encrypting Password using md5() function - The Scripts Library Community

Free Programming Tutorials & Source Code

 
  • Increase font size
  • Default font size
  • Decrease font size
Home PHP Encrypting Password using md5() function

Encrypting Password using md5() function

E-mail
(1 vote, average: 5.00 out of 5)

PHP provide a variety of function to get our source secure. This simple article shows how to use the md5() function to encrypt data, especially passwords in the database.
The code is easy:
 
$password = "test"; // define a password variable, assign “test” value to it
$encryptedpassword = md5($password); //encrypting the password using md5()
echo "Password before encryption: $password"; // write the original password
echo "Password after encryption: $encryptedpassword"; // write the encrypted password
?>

the out put gonna be:
Password before encryption: test
Password after encryption: 098f6bcd4621d373cade4e832627b4f6