Help with the simplest possible form... - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-30-2008, 08:48 AM   #1 (permalink)
Junior Member
 
Join Date: Nov 2008
Posts: 7
Question 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 &amp; 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.
abigailhamilton is offline   Reply With Quote
Sponsored Links
Old 12-01-2008, 05:10 PM   #2 (permalink)
Junior Member
 
Join Date: Dec 2008
Posts: 1
Default 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 &amp; 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)<|| strlen($numberofguests)<|| 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 '';

}
?>
mark36ph is offline   Reply With Quote
Old 12-03-2008, 04:32 PM   #3 (permalink)
Junior Member
 
Join Date: Nov 2008
Posts: 7
Question 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?!
abigailhamilton is offline   Reply With Quote
Old 12-05-2008, 06:31 AM   #4 (permalink)
Junior Member
 
Join Date: Dec 2008
Posts: 16
Default 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 &amp; 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
ymedia is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:31 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting