My pet pev is having a **** load of web pages... I'm trying to get a forum to email in a single page instead of 2 pages, but am having troubles
html input page 1
<form method="post" action="sendeail.php" >
<input type="text" name="visitor" value="name" size="40" maxlength="40" />
<input type="text" name="visitormail" value="email" size="40" maxlength="40" />
<input type="text" name="site" id="site" value="website (optional)" size="40" maxlength="40" />
<textarea name="notes" cols="40" rows="4" >...</textarea>
<input type="submit" value="+send" /> <input name="reset" type="reset" value="-clear" />
</form>
send and thanks page
<?php
$visitor = $_POST['visitor'];
$visitormail = $_POST['visitormail'];
$notes = $_POST['notes'];
$site = $_POST['site'];
//spam filter
if (eregi('http:', $notes)) {
die ("Do NOT spam my site --Mod Edited--.");
}
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
{
echo "Use Back --Mod Edited-- and enter a valid e-mail adress\n";
$badinput = "Feedback was NOT submitted\n";
echo $badinput;
die ("");
}
if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "Use Back --Mod Edited-- and fill in all fields.\n";
die ("");
}
$todayis = date("M j") ;
$subject = $visitor;
$notes = stripcslashes($notes);
//email to me
$message = "
$todayis | $visitor | $visitormail \n
$site\n
$notes \n
";
$from = "From: $visitormail\r\n";
mail("blah@blah.com", $subject, $message, $from);
?>
<html>
<head>
<title>Contact Receipt</title>
</head>
<body><p>
Date: <?php echo $todayis ?>
Thank's: <?php echo $visitor ?> | <?php echo $visitormail ?>
From: <?php echo $site ?>
Message: <?php $notesout = str_replace("\r", "<br/>", $notes); echo $notesout; ?>
</p>
</body>
</html>