Login Page with md5 Encryption in Password field using PHP/MySQL

Language

This code will teach you on how to create a login form with md5 encryption. The feature of this code is, it has a input validation and the password are being encrypted using md5. Download and try this code to learn on how to create a login form with md5 encryption. database name: simple_login

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

Submitted byAnonymous (not verified)on Wed, 02/13/2013 - 18:44

nice one argie .. :)
Submitted byMonty R Ferbert (not verified)on Sun, 12/22/2013 - 04:08

I've got the username and password and everything done the way you showed it in the tutorial however why is it the connection.php file works for the registration page just fine. Put there seems to be a problem with it being able to see the data that is already in the database. Why Because when I use Richmouse and the password it tell me It can't find it.

It doesn't work i already connect it to the database still have an error it says that: .username and password not found but i already connect it to the database and i already insert a username and password in localhost.
Submitted byDeejay F (not verified)on Fri, 11/04/2016 - 21:55

I found the solution for the connection error. On the "login.php" in the "Create query" replace: //Create query $qry="SELECT * FROM member WHERE username='$username' AND password='".md5($_POST['pass'])."'"; $result=mysql_query($qry); By : $password = md5($password); //Create query $qry="SELECT * FROM member WHERE username='$username' AND password='$password'"; $result=mysql_query($qry); and enjoy !!!
Submitted byDeejay F (not verified)on Fri, 11/04/2016 - 21:55

I found the solution for the connection error. On the "login.php" in the "Create query" replace: //Create query $qry="SELECT * FROM member WHERE username='$username' AND password='".md5($_POST['pass'])."'"; $result=mysql_query($qry); By : $password = md5($password); //Create query $qry="SELECT * FROM member WHERE username='$username' AND password='$password'"; $result=mysql_query($qry); and enjoy !!!

Add new comment