I need some PHP help......!?

drew8818

New member
I keep getting a syntax error for my very basic email form. I have included both html and php below. The PHP is in it's own .php file and was uploaded to my webhost. Can someone help? Thanks

HTML:
<form style="height: 68px; margin-left: 278px; width: 388px;"
action="art_inquiry.php" method="post"
enctype="text/plain">
Email Address:
<input name="comment" value="" size="40"
type="text" /><input value="Send" type="submit" /></form>


PHP:

<?php $to = "email address";
$subject = "Art Newsletter";
$email = $_REQUEST['email'];
$headers = "From: $email";
$sent = mail($to, $subject, $message, $headers);
if($sent)
{print('<a href="index.html">Thank you! Your email address has been received!</a>;}
?>
 
try putting $_POST['comment']

First off you named your input box for email address "comment" not email, so putting email as the name of the box isn't going to work.

I have a PHP mailing script and I use $_POST rather then $_REQUEST, I would try changing it from email to comment, and if that doesn't work try the post.
 
Back
Top