hello -
i'm trying to create a simple email submission form. obviously i'm a newb so i've been trying to scour the web for some samples. i think i'm quite close in getting this to work but would like a little assistance because i'm kind of stumped at this point.
here's the submission form:
http://www.prgallery.com/new/mail.php
here's the code i'm referencing:
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sendemail Script</title>
</head>
<body>
<?php
$email = $POST["email"];
$headers = "From: " . $POST["email"];
$name = $_POST["name"];
$subject = "[Newsletter Subscription Request] New User";
$time = date("l d F Y @ H:i");
$to = "justin@myemail.com";
$message2 = "\nName: " . $name . "\nEmail: " . $email . "\nAddress: " . $address . "\nCity/State: " . $citystate . "\nZip: " . $zip ;
if ($email != ") {
if (mail($to, $message2)) {
header("Location:/new/thankyou.php");
}
else {
print("The server encountered an unexpected condition which prevented it from fulfilling the request.");
}
}
else {
print("Please fill out all fields.");
}
?>
here's the error i receive when hitting submit:
Parse error: parse error, unexpected T_STRING in /home/prg/public_html/new/mailscript.php on line 15
let me know if you want to see the form for the mail.php page.
thank you very much.
justin