11-30-2008, 08:48 AM
|
#1 (permalink)
|
|
Junior Member
Join Date: Nov 2008
Posts: 7
|
I need help with the simplest possible form...
Hi pals. I have a form that is not working, and I know it's some dumb detail that I have missed. If you have a minute will you help me?
The form code is:
<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 in 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 = '';
}
?>
The form can be seen live at http://jillbucy.com/ at the top of the page.
Thanks in advance for your help!!!
A
Last edited by abigailhamilton; 11-30-2008 at 05:23 PM.
|
|
|
12-01-2008, 05:10 PM
|
#2 (permalink)
|
|
Junior Member
Join Date: Dec 2008
Posts: 1
|
Re: Help with the simplest possible form...
I'm still learning myself, But try this..
PHP Code:
<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 in 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 = '';
}
?>
|
|
|
12-03-2008, 04:32 PM
|
#3 (permalink)
|
|
Junior Member
Join Date: Nov 2008
Posts: 7
|
Re: Help with the simplest possible form...
Thanks so much! I tried it and it doesn't seem to work though; I am submitting my email address and not getting a notice to the post-to email address. Any further help?!
|
|
|
12-05-2008, 06:31 AM
|
#4 (permalink)
|
|
Junior Member
Join Date: Dec 2008
Posts: 16
|
Re: I need help with the simplest possible form...
Quote:
|
Originally Posted by abigailhamilton
Hi pals. I have a form that is not working, and I know it's some dumb detail that I have missed. If you have a minute will you help me?
The form code is:
<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 in 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 = '';
}
?>
The form can be seen live at http://jillbucy.com/ at the top of the page.
Thanks in advance for your help!!!
A
|
Great work!!It will help me for my web site development.Thanks lots
To know more on iphone application development please visit here http://www.ymedialabs.com
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|