The following code is throwing a T-variable exception in line 10
//Two Email Lines
$email_to = "[email protected]";
$email_subject = "AUTO: WEB BETA INVITE REQUEST";
//Set equal to email form textbox
$email_form = $_POST["email_text"];
$email_message = "Email: "$email_form"";
//Create email headers
$headers = 'From: '.$email_form."\r\n".
@mail($email_to, $email_subject,$email_message,$headers);
When I change the = "Email: "$email_form""; to single quotes around the variables $email_form, it runs and throws no exception. However, it sends an email that says "Email: ''", as in, it reads the $email_form variable as blank, which it was not.
The HTML code for the form is below.
<form method="post" action="Email_Form_Script.php" enctype="text/plain" onsubmit="window.open('FormPopUp.html','popup','width=500,height=500,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0');" >
<div><input type="text" class="text" name="email_text" id="emailForm" value="Enter your e-mail address" onfocus="if(this.value=='Enter your e-mail address') { this.value = '' }" onblur="if(this.value=='') { this.value = 'Enter your e-mail address' }" /><input type="hidden" value="" name="email2"/><input type="hidden" name="loc" value="en_US"/><input type="submit" class="submit" value=""
/></div></form>
Thanks for the help
mail()
? I don't believe it can even throw an exception! Don't suppress problems, catch and handle appropriately, or fix them.