require("../inc/db_conn.php"); $errMsg = ""; if(isset($_POST['emailAddr']) && $_POST['emailAddr'] != "") { // Send to the email on record // First, get email $emailAddr = $_POST['emailAddr']; $getEmailQ = "select first_name, last_name, pword from user_accounts where email = '" . $emailAddr . "'"; #echo("Query: $getEmailQ
\n");
$getEmail = mysql_query($getEmailQ);
if(mysql_num_rows($getEmail) == 1) {
$personName = mysql_result($getEmail,0,0) . " " . mysql_result($getEmail,0,1);
$personPW = mysql_result($getEmail,0,2);
// Mail it
$theMessage = "Hello $personName,\n\nYour password has been requested from BrickFest.com.\n\nYour password for BrickFest is \"" . $personPW . "\". You can log in by going to http://www.brickfest.com and selecting the appropriate event.\n\nSincerely,\nThe BrickFest Staff\n";
$to = $emailAddr;
#$to = "kelly@mckiernan.com"; // For testing
#$headers .= "To: " . $personName . "\r\n";
$headers = "From: BrickFest Enter your email address that you signed up with and we'll send your password to that email.Forgot your password?
echo($errMsg);
if($showForm) { ?>