I have a form to submit an amail address to sign up for newsletters, and it's not delivering the submitted info correctly. I'm hoping this question is so easy that someone can quickly help me fix it! The form is live at http://jillbucy.com
<form method="post" action=""> <p class="body"><span class="style4">Receive Jill Bucy Skincare event invitations & news</span><br /> <span class="input-body"> <input name="Email" type="text" id="Email" size="30" maxlength="80" value="Simply enter your e-mail address" /> </span> <input type="submit" name="Submit" value="Submit" /> </form>
And there's some php junk before the head:
<?php
$email = $HTTP_POST_VARS['Email'];
$mailto = "info@jillbucy.com, jillbucy@msn.com, jill@ah.candyhog.com, ah@candyhog.com";
$mailsubj = "Mailing list request";
$mailhead = "From: ".$email."\n";
$err = 0;
if ( strlen($name)<3 || strlen($numberofguests)<1 || strlen($email)<5) {
$err=1;
}
if (!$err) {
reset ($HTTP_POST_VARS);
$mailbody = "A visitor would like to be added to the email list for invites and newsletters:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= $key." : ".$val."\n"; }
/// if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
mail($mailto, $mailsubj, $mailbody, $mailhead);
$email = '';
}
?>
Thanks in advance!
This post has been edited by abigailhamilton: 03 December 2008 - 04:46 PM

New Topic/Question
Reply




MultiQuote



|