Hello friends-- I'm very new to PHP and was provided this script by a friend who showed me it working about 7 months ago. I am now trying to use it on another site, basically this will e-mail a bunch of info from a form and send an e-mail out. However, I am getting a parse error:
[INDENT]
Parse error: syntax error, unexpected '<' in /home/mshconst/public_html/scripts/php-contact-info.php on line 10[/INDENT]
Please help, here is my code:
<?php
$message = "";
// User Defined
$subject = "MSH WEBSITE INFO REQUEST";
$to = "who its to";
$to_email = <mailto:email@hotmail.com> "email@hotmail.com";
$from = "MSH Construction Online";
$from_email = <mailto:email@yahoo.com>
"PMT Info";
$message .= "Name:" + $_POST["Name"] + "\n"
$message .= "Company:" + $_POST["Company_Name"] + "\n"
$message .= "Address1:" + $_POST["Address1"] + "\n"
$message .= "Address2:" + $_POST["Address2"] + "\n"
$message .= "City:" + $_POST["City"] + "\n"
$message .= "State:" + $_POST["State"] + "\n"
$message .= "Zip Code:" + $_POST["Zip"] + "\n"
$message .= "Country:" + $_POST["country"] + "\n"
$message .= "Phone:" + $_POST["phone"] + "\n"
$message .= "Fax:" + $_POST["fax"] + "\n"
$message .= "E-mail:" + $_POST["email"] + "\n"
$message .= "Industry Type" + $_POST["IndustryType"] + "\n"
$message .= "Other Questions or Comments:" + $_POST["Questions_Comments"] + "\n"
// where form_variable_names are the variables the form elements are named
// Auto Built
$target = '"' . $to . '" <' . $to_email . '>';
$additional_headers = ""
. 'Return-Path: "' . $from . '" <' . $from_email . ">\n"
. 'From: "' . $from . '" <' . $from_email . ">\n"
. 'Reply-To: "' . $from . '" <' . $from_email . ">\n"
. 'X-Mailer: PHP"' . phpversion() . '"' . "\n"
. 'X-From-IP: "' . $user_ip . '"' . "\n";
mail( $target, $subject, $message, $additional_headers );
?>
[ Mod Edit - bpat1434 ] Added php tags, removed full email addresses.