Jazzy 1012
asked on
How to use md5 hashing
I have a table for my users and i created a column called "hash"
They get an email when they request "forgot password" it sends them to a link that has a form to change the password.
I want that link to have a hash by using md5, therefore it would be more secure, but im unsure where to start and what code to write, I just have this email code so far:
They get an email when they request "forgot password" it sends them to a link that has a form to change the password.
I want that link to have a hash by using md5, therefore it would be more secure, but im unsure where to start and what code to write, I just have this email code so far:
<?php
require "connection.php";
$email = $_POST['email'];
if(isset($_POST['submit']))
{
$check = mysqli_query($conn, "select * from users where email = '$email' ");
$row = mysqli_fetch_array($check);
$message ="Please click here to create a new password www.jasmine.com/i";
$subject = 'Change password';
$body = "E-Mail: $email\n Message:\n $message";
if($row)
{
$res = mail ($email, $subject, $body);
echo "Please check your email";
}
}
else
{
echo "Email Not Found";
}
?>
ASKER
Yes but I will need to use MD5, can you help me with using it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://www.experts-exchange.com/articles/28768/Password-Hashing-in-PHP.html
See also: http://php.net/manual/en/faq.passwords.php#faq.passwords.fasthash