Hmm, well it had a syntax error on this line:
Email: ".$_POST['email']
Somthing about an unexpected "
So I removed it and have changed the code to this:
Now when I run it it always reports "Please use the Back button and enter an e-mail address" so basically it thinks visitormail is empty. I've changed the news.php page so that the form has this <input type='text' name='visitormail' size='40'> but it doesn't seem to work. Any ideas where I'm going wrong? Thanks.
Email: ".$_POST['email']
Somthing about an unexpected "
So I removed it and have changed the code to this:
<?php if(!$visitormail == "" && (!strstr($visitormail,"@") || ! strstr($visitormail,"."))) { echo "<h2>Please use the Back button and enter a valid e-mail address.</h2>\n"; } if(empty($visitormail)) { echo "<h2>Please use the Back button and enter an e-mail address.</h2>\n"; } $todayis = date("l, F j, Y, g:i a") ; $attn = $attn ; $subject = "Newsletter request"; $notes = stripcslashes($notes); $message = " $todayis [EST] \n Attention: $attn \n Message: $notes \n From: $visitor ($visitormail)\n Additional Info : IP = $ip \n Browser Info: $httpagent \n Referral : $httpref \n "; $from = "From: $visitormail\r\n"; mail("info@...", $subject, $message, $from); ?>
Now when I run it it always reports "Please use the Back button and enter an e-mail address" so basically it thinks visitormail is empty. I've changed the news.php page so that the form has this <input type='text' name='visitormail' size='40'> but it doesn't seem to work. Any ideas where I'm going wrong? Thanks.