Posted by Pete Marsh on 04/09/07 18:28
Wondering if anyone can see an error with this script. I get a server
configuration error. THat could mean a module is not being loaded, but
maybe there's a syntax error here, can anyone spot it? Thanks
<?
Error_Reporting(E_ALL & ~E_NOTICE);
$subject="from ".$_REQUEST['Your_Name:'] ;
$headers= "From: ".$_REQUEST['Your_Email:'] ."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
$message='';
while ($field = current($_REQUEST)) {
if ((key($_REQUEST)!="Your_Name:") && (key($_REQUEST)!
="Your_Email:") && (key($_REQUEST)!="Message:") && (key($_REQUEST)!
="i")) {
$message.="<strong>".key($_REQUEST)."</strong> ".
$field."<br>";
}
next($_REQUEST);
}
$message.="<br>".$_REQUEST['Message:'];
mail($_REQUEST['recipient'], $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$message."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");
?>
[Back to original message]
|