forgot password script php help?
have a register/forgott password script and i want to know how i can make the message " your password has been sent to your email"
appear n the same pag. Right now i fowads to i white page with nothing but the message. pls hepl thanks
>?php
require_once("connect.php");
$email = $_POST['email'];
if($email == NULL)
{
} else {
$getpassword = mysql_query("SELECT password FROM members WHERE email = '$email'");
while($res=mysql_fetch_object($getpass...
{
$password = $res->password;
}
if($password == NULL)
{
$errd = "<div style=\"color:red;\"><center><b>Incorrec... email format -or- e-mail does not exist in our database, try again!</b></center></div>";
} else {
$to = $email;
$subject = "Your www.mysite.com password";
$headers = "From: admin@mysite.com\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\n";
$message = "Here is your password for the website www.cusapp.com
Password: $password
Best Regards!
";
|