$title = "Forgot Password";
require_once("/var/www/chemmol/includes/db.php");
if ($_POST)
{
$email = $_POST[user_email];
$sql = "select password from register_gold WHERE email='$email' ";
$result = mysql_query($sql) or die("Query Failed." . mysql_error() . " ". $sql);
$user_array = mysql_fetch_array($result);
if ($user_array == false)
{
$rmsg = "
Please enter a correct email address and try again!
" ; } else { $pw = $user_array[password]; $headers = "From: noreply@ChemMol.com" ; $subject = 'your password'; $recipient = $email ; $email_msg="\r\n **************** Your Password for ChemMol.com ********************* \r\n $pw"; mail($recipient, $subject, $email_msg, $headers); if ($result) { $rmsg = "Your password has been sent to email : $email. Thank you!
" ; } } } ?>