Please help with some simple HTML Form code

Miscellaneous Forums/General Discussion/Please help with some simple HTML Form code

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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:

<?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.