I’m trying to get this formmail to work but can’t. What am i doing wrong?
I need all of these field to come through in the email but how?
// you can specify which email you want your contact form to be emailed to here
$toemail = "[email protected]";
$subject = “Profile From Portamer Marketing”;
$headers = “MIME-Version: 1.0\n”
.“From: “”.$firstname.”" <".$email.">\n"
.“Content-type: text/html; charset=iso-8859-1\n”;
$body = “Firstname: “.$firstname.”
\n”
.“Email: “.$email.”
\n”;
if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$", $email))
{
echo “That is not a valid email address. Please return to the”
." previous page and try again.";
exit;
}
mail($toemail, $subject, $body, $headers);
echo "Thanks for submitting your comments";
?>
I appreciate anything anyone can do for/with me. I am in the process of studying Lynda.com php beginner, but I need this for up by tomorrow.