westmatrix99
12-29-2006, 10:10 PM
Try this one, just google phpmail() for the same script.
Hi this is a script that I got off the phpmail() site but can't do an if then else statement if someone is not registered on the site, any help would be great.
Thanks West
<?php require_once('Connections/cnfur.php'); ?>
<?php
$colname_rsforgot = "-1";
if (isset($_POST['email'])) {
$colname_rsforgot = (get_magic_quotes_gpc()) ? $_POST['email'] : addslashes($_POST['email']);
}
mysql_select_db($database_cnfur, $cnfur);
$query_rsforgot = sprintf("SELECT * FROM memlogin WHERE memEmail = '%s'", $colname_rsforgot);
$rsforgot = mysql_query($query_rsforgot, $cnfur) or die(mysql_error());
$row_rsforgot = mysql_fetch_assoc($rsforgot);
$totalRows_rsforgot = mysql_num_rows($rsforgot);
$name = $row_rsforgot['memUsername'];
$email = $_POST['email'];
$password = $row_rsforgot['memPassword'];
require("mail.inc.php");
$mail = new my_phpmailer;
$mail->AddAddress ($email);
$mail->Subject = "Lost password";
$mail->Body = "Please note that if the password field is blank, then you are not registered with Furkids.\nIf you would like to register goto http://www.furkids.co.za\n\n\n\nPassword as requested from Furkids.\nDo not share your password with anyone. \nIf you forget your password, you may have it emailed to you. Please ensure you keep your email address current. \n\nUsername: $name \nPasword: $password\n\nClick here to continue: \nhttp://www.furkids.co.za \n\n\n\n\n\n\n\nTo access this site if the link is not working; just copy and paste this link below into your web browser. \n\nhttp://www.furkids.co.za \n\nThanks for your support!";
if(!$mail->Send()){
echo "There was an error sending the message";
}
else{
echo "Your password has been sent to your email. <a href='javascript:self.close();'>Close window</a><br> Login once you have received your email.";
}
?>
<?php
mysql_free_result($rsforgot);
?>
Hi this is a script that I got off the phpmail() site but can't do an if then else statement if someone is not registered on the site, any help would be great.
Thanks West
<?php require_once('Connections/cnfur.php'); ?>
<?php
$colname_rsforgot = "-1";
if (isset($_POST['email'])) {
$colname_rsforgot = (get_magic_quotes_gpc()) ? $_POST['email'] : addslashes($_POST['email']);
}
mysql_select_db($database_cnfur, $cnfur);
$query_rsforgot = sprintf("SELECT * FROM memlogin WHERE memEmail = '%s'", $colname_rsforgot);
$rsforgot = mysql_query($query_rsforgot, $cnfur) or die(mysql_error());
$row_rsforgot = mysql_fetch_assoc($rsforgot);
$totalRows_rsforgot = mysql_num_rows($rsforgot);
$name = $row_rsforgot['memUsername'];
$email = $_POST['email'];
$password = $row_rsforgot['memPassword'];
require("mail.inc.php");
$mail = new my_phpmailer;
$mail->AddAddress ($email);
$mail->Subject = "Lost password";
$mail->Body = "Please note that if the password field is blank, then you are not registered with Furkids.\nIf you would like to register goto http://www.furkids.co.za\n\n\n\nPassword as requested from Furkids.\nDo not share your password with anyone. \nIf you forget your password, you may have it emailed to you. Please ensure you keep your email address current. \n\nUsername: $name \nPasword: $password\n\nClick here to continue: \nhttp://www.furkids.co.za \n\n\n\n\n\n\n\nTo access this site if the link is not working; just copy and paste this link below into your web browser. \n\nhttp://www.furkids.co.za \n\nThanks for your support!";
if(!$mail->Send()){
echo "There was an error sending the message";
}
else{
echo "Your password has been sent to your email. <a href='javascript:self.close();'>Close window</a><br> Login once you have received your email.";
}
?>
<?php
mysql_free_result($rsforgot);
?>