Hi,
I have a page that is supposed to send an email to a newly registered member, that it is not sending anymore. Memebers would sign up on the signup_go.php page and then they would get a confirmation email and it would go to the confirmation page.
here is the code for the signup page:
<?include_once "class.DBConn.php";include_once "class.Forms.php";
$form = new Form();$conn = new DBConn();switch($form->ReqVarName){case "fname": $mesaj = "First name is required.";
break;case "lname": $mesaj = "Last name is required.";
break;case "address": $mesaj = "Streed address is required.";
break;case "city": $mesaj = "City is required.";
break;case "state": $mesaj = "State is required.";
break;case "phone": $mesaj = "Phone No. is required.";
break;case "zip": $mesaj = "Zip code is required.";
break;case "email": $mesaj = "A valid email address is required."; break;case "username": $mesaj = "Username is required."; break;case "password": $mesaj = "Password is required."; break;case "cfmpassword": $mesaj = "Password confirm is required"; break;case "refcode": $mesaj = "Referer code is required";
break;default : $mesaj = "";break;}if ( !empty($mesaj) )
{$mesaj = "<tr><td colspan=\"3\" align=\"center\" style=\"color:red\">$mesaj</td></tr>";
include "signup.php";exit (0);}
if ( strcmp($_POST['password'], $_POST['cfmpassword']) !=0 && empty($mesaj) ){$mesaj = "Passwords do not match";$form->ReqVarName = "cfmpassword";}if ( strlen($_POST['password']) < 5 && empty($mesaj) ){$mesaj = "Password is too short. Minimum 5 characters.";$form->ReqVarName = "password";}$link = $conn->DBStart();$isAlready = mysql_query("SELECT id FROM users WHERE username = '".$_POST['username']."' ");if ( mysql_num_rows($isAlready) > 0 ){$mesaj = "This username is alreasy taken.";$form->ReqVarName = "email";}if ( !empty($mesaj) ){$mesaj = "<tr><td colspan=\"3\" align=\"center\" style=\"color:red\">$mesaj</td></tr>";include "signup.php";exit (0);}else{$query = "INSERT INTO users VALUES ('', '".$_POST['fname']."', '".$_POST['lname']."', '".$_POST['address']."', '".$_POST['city']."', '".$_POST['state']."', '".$_POST['phone']."', '".$_POST['zip']."', '".$_POST['email']."', '".$_POST['imid']."', '".$_POST['username']."', '".md5($_POST['password'])."', '".date("Y-m-d")."', '".$_POST['gtag']."', '".$_POST['psp']."','' , '".$_POST['refcode']."', 0, 0, 0, 0, 0, 0, 0)";
}if ( mysql_query( $query ) ){include("send_mail_html.php");
$sendto = $_POST['email'];
$subject = "Registration at TempleOfGames.com";
$message = "welcome";}?><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></head>
The code for the page that is supposed to come up next is this on (confirmation.php):
<?
session_start();
include_once "class.DBConn.php";
include_once "class.Forms.php";
if ( !isset($form->ReqVarName) )
$form = new Form();
?>
<? include "header.php"; ?>
<table cellpadding="0" cellspacing="0" width="769">
<tr>
<td width="63" background="images/clbg.jpg" valign="top"><img src="images/clt.jpg" width="63" height="60"/></td>
<td rowspan="2" >
<table cellspacig="0" cellpadding="0" width="100%" height="100%">
<tr><td valign="top" align="center" style="padding:20px;" class="txt">
<?
switch ($_GET['msg'])
{
case 0:$content = 'ERROR! Your informations could NOT be saved.'; break;
case 1:$content = 'An email was sent to the email address used at the registration. Please check your mailbox.'; break;
case 3:$content = 'Your code is not valid';break;
case 4:$content = 'Your have no code';break;
case 5:$content = 'You have changed your email address. An email was sent to this new email address. Please check your mailbox.';break;
}
echo $content;
?>
</td></tr>
</table>
</td>
<td width="63"background="images/crbg.jpg" valign="top"><img src="images/crt.jpg" width="63" height="60"/></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0">
<tr>
<td width="769" height="18" background="images/footer.jpg"></td>
</tr>
</table>
</center>
</body>
</html>
Currently, when a new member registers, it goes to a blank white screen (www.xxx/signup_go.php). The mebers do get regestered in the database, but no email is sent so they can validate their account. It used to go to the confirmation page. I messed up the code and now im up a creek. There is no backup to go from.
Any help or guidance would be greatly appreciated.