Need help with PHP!!?

drew8818

New member
I keep getting a syntax error for my very basic email form.

Parse error: syntax error, unexpected $end in /homepages/21/d288480334/htdocs/art_inquiry.php on line 16

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>;}
?>
 
change
$headers to $headers = "From: . " . $email;

print to print('<a href=\"index.html\">Thank you! Your email has been received!</a>');

Contact me if you need more help.
 
Back
Top