FORUMS: list search recent posts

PHP Script Error (HELP)

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Peter Berthet
PHP Script Error (HELP)
on Dec 11, 2008 at 4:30:13 am

Hey,

im not a php expert by any stretch but ive got this little code together to run the backend of a email form on a website, and im getting this message when i execute the code.

Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/lefflerp/public_html/contact.php on line 40

Parse error: syntax error, unexpected T_VARIABLE in /home/lefflerp/public_html/contact.php on line 43


Now i have no idea where im going wrong here, so if someones got a sec to check the script and let me know where the hole is, id appreciate it!

Heres the code:


$EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
$EmailTo = "mail@mail.com";
$Subject = "Website - Information Request";
$Name = Trim(stripslashes($_POST['Name']));
$Company = Trim(stripslashes($_POST['Company']));
$City = Trim(stripslashes($_POST['City']));
$Tel = Trim(stripslashes($_POST['Tel']));
$Info = Trim(stripslashes($_POST['Question']));

$validationOK=true;
if (Trim($EmailFrom)=="") $validationOK=false;
if (!$validationOK) {
print "";
exit;
}

$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "n";
$Body .= "Company: ";
$Body .= $Company;
$Body .= "n";
$Body .= "City: ";
$Body .= $City;
$Body .= "n";
$Body .= "Tel: ";
$Body .= $Tel;
$Body .= "n";
$Body .= $Info;
$Body .= "n"'

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

if ($success){
print "";
}
else{
print "";
}
?>


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]