About

<?php session_start();

$email=$_POST[’email’];
$submit=$_POST[‘submit’];
include(“connect.php”);
if($submit){
$email_check=mysql_query(“select * from login where log_email='”.$email.”‘”);
$count=mysql_num_rows($email_check);
if($count!=0){
$random=rand(72891,92729);
$new_password=$random;
$email_password=$new_password;
$new_password=md5($new_password);
mysql_query(“update login set log_password='”.$new_password.”‘ where email='”.$email.”‘”);
$subject=”Login Information”;
$message=”your password has been changed to $email_password”;
$from=”from:info@dazzletechnolab.com”;
ini_set(‘sendmail_from’, ‘me@domain.com’);
mail($email, $subject, $message, $from);
echo “your new password has been Email you”;
}
else{
header(‘Location: login.php?msg=Please Enter Correct Email Address…’);
}
}
?>

Leave a comment