PDA

View Full Version : Help please! my contact.php is slightly off and i can't figure out why


anthonydejohn
03-23-2008, 01:06 AM
Ok, so I'm new to this whole Flash and PhP thing, but well.. I'm tryin to figure it out... But, basically I'm trying to make the form on my content page work; below I've attached some code that I found somewhere and used because it actually worked for the most part, however, there is one thing wrong... When I receive an email submited via the form the end of the message always has this added onto it: &777&Mes


here is a sample email:

Subject: charlie
From: charles15@gmail.com
Date: Sat, Mar 22, 2008 5:03 pm
To: info@jslandscape.net

yo charlie this is the message i'm sending you&777&Mes







Here is my content.php code:



<?
Error_Reporting(E_ALL & ~E_NOTICE);

while ($request = current($_REQUEST)) {
if (key($_REQUEST)!='recipient') {
$pre_array=split ("&777&", $request);
$post_vars[key($_REQUEST)][0]=$pre_array[0];
$post_vars[key($_REQUEST)][1]=$pre_array[1];
}
next($_REQUEST);
}



reset($post_vars);


$subject="Customer: ".$post_vars['your_name'][0] ;
$headers= "From: ".$post_vars['your_email'][0] ."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';

$mess=$_REQUEST['message'];
$message=substr($mess,0,strlen($mess)-5);

mail("info@jslandscape.net", $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$message."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");

?>
<script>
resizeTo(300, 300);
</script>