Hi… I am needing help… I dont know anything about PHP. I was wondering if someone could be so grateful as to help me.
I am making this website for my boss. http://www.stlsportsphoto.com
The form on [COLOR=#0000ff]Your Favorite Team’s E-Mail Notification[/COLOR] page is not working. I used a code that I got off of this site.
I keep getting the following error message when I submit the form.
Parse error: parse error, unexpected T_STRING in /home/www/stlsportsphoto.com/mailer.php on line 8
I have a simple html form… set with action=“mailer.php”
The mailer.php file is as follows:
<?PHP
$to = "stlcardinalgirl@yahoo.com";
$subject = "Results from Team Notification Form";
$headers = "From: My Site";
$forward = 1;
$location = "stlsportsphoto.com/mailform/thankyou.htm;
$date = date ("l, F jS, Y");
$time = date ("h:i A");
$msg = "Below is the result of your feedback form. It was submitted on $date at $time.
";
if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "
";
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "
";
}
}
mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header ("Location:$location");
}
else {
echo "Thank you for submitting our form. We will get back to you as soon as possible.";
}
?>
Can someone please offer me any kind of assistance???
Thanks so much!!!
Melissa