This is what I have tried so far:<?php
// Website Contact Form Generator
// http://www.tele-pro.co.uk/scripts/contact_form/
// This script is free to use as long as you
// retain the credit link
// get posted data into local variables
$EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
$EmailTo = "info@leveltenstudios.net";
// validation
$validationOK=true;
if (Trim($EmailFrom)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
exit;
}
// prepare email body text
$Body = "";
$Body .= "FirstName: ";
$Body .= $name;
$Body .= "\n";
$Body .= "LastName: ";
$Body .= $lname;
$Body .= "\n";
$Body .= "E-mail: ";
$Body .= $email;
$Body .= "\n";
$Body .= "Phone: ";
$Body .= $phone;
$Body .= "\n";
$Body .= "City: ";
$Body .= $IDcity;
$Body .= "\n";
$Body .= "State/Province: ";
$Body .= $Province_State;
$Body .= "\n";
$Body .= "Zip Code/Postal: ";
$Body .= $postalcode;
$Body .= "\n";
$Body .= "Questions: ";
$Body .= $comments;
$Body .= "\n";
$Body .= "email_opt_in: ";
$Body .= $email_opt_in;
$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=http://www.nlm-pro.com\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}
?>