|
Lupa Password |
if (isset($_POST['act']) AND $_POST['act']=='isi')
{
//mail disini-------------------------------------------------------------------------------------------------------
$q=mysql_fetch_array(mysql_query("SELECT noid,username,password2,email from $tabelLogin where email='$_POST[email]' "));
if (!empty($q['noid']))
{
$to = $_POST['email'];
$from = 'fst@usd.ac.id';
$subject = 'Password Web FST USD ';
$message = "
username Anda adalah : $q[username] password Anda adalah : $q[password2]
Hormat kami,
BAPSI USD
";
$body = "\n";
$body .= "\n";
$body = $message;
$body .= "\n";
$body .= "\n";
$headers = "From: fst@usd.ac.id" . "\r\n"; // Sender's Email Address
$headers .= "Return-Path: FST USD /n"; // Indicates Return-path
$headers .= "Reply-To: FST USD /n"; // Reply-to Address
$headers .= "X-Mailer: PHP/" . phpversion(); // For X-Mailer
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1"."\r\n"; // Set Content Type For Text Email
$ok = @mail($to, $subject, $body, $headers);
//mail disini-------------------------------------------------------------------------------------------------------
echo ("Password sudah dikirim ke email Anda. Cek di inbox atau di spam.
Silahkan melanjutkan akses web ini.");
}
else if (empty($q['noid']))
{
echo ("Email Anda salah atau belum registrasi
Silahkan ulangi memasukan email atau daftar disini.");
}
}
else
{
echo ("
");
}
?>
|
|
|
|
|