0

Php help needed

<?php

$EmailFrom = "pettin@pettingzoohaven.com";
$EmailTo = "dhollinshed@att.net","hopdezin@swbell.net";
$Subject = "Booking Contact Us";
$Name = Trim(stripslashes($_POST['Name']));
$Company = Trim(stripslashes($_POST['Company']));
$Address = Trim(stripslashes($_POST['Address']));
$Phone = Trim(stripslashes($_POST['Phone']));
$Email = Trim(stripslashes($_POST['Email']));
$Message = Trim(stripslashes($_POST['Message']));

// validation
$validationOK=true;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
exit;
}

// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Company: ";
$Body .= $Company;
$Body .= "\n";
$Body .= "Address: ";
$Body .= $Address;
$Body .= "\n";
$Body .= "Phone: ";
$Body .= $Phone;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $Message;
$Body .= "\n";

// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=contactthanks.htm\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}

?>

This Error message appears: Parse error: syntax error, unexpected ',' in /usr/home/pettin/www/htdocs/processformc.php on line 4

by
2 Replies
  • "dhollinshed@att.net","hopdezin@swbell.net"; - coma can't be there

    "dhollinshed@att.net , hopdezin@swbell.net"; - good solution
    0
  • QUOTE (Patrycjusz @ May 20 2010, 02:23 AM) <{POST_SNAPBACK}>
    "dhollinshed@att.net","hopdezin@swbell.net"; - coma can't be there

    "dhollinshed@att.net , hopdezin@swbell.net"; - good solution



    Thanks That Worked...
    0

Recent Posts

in PHP Development