Encrypting Password using md5() function

Using md5(); function to make your login system more secure.




Use md5(); to encrypts password to make it more secure


Look at these two databases, it's the same person and same info, the first one we don't encrypt his password, but the second one we encrypted his password.

When you encryte "john856" using this code, you'll see the result

This is not a random result, everytime you encrypt the same password you will get the same result.


echo $encrypt_password;

Example - Login

This is an example Login with encrypted password, but don't forget to encrypt password and insert into database when your user sign up.

// username and password sent from form


// encrypt password

$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$encrypted_mypassword'";

You can learn to create login system here

Similar Post

PHP Multiple files upload

You can upload multiple files with one time submittion. Array is a big role in this tutorial, let's see the scripts.

Automatic refresh webpage / Set time to redirect

When you need your web page automatic refresh in 5 second or any second, use this meta tag. it's a simple code, put it between HEAD tag in your web page.