You are here: Re: Passing Variables from a form to an email « All PHP « IT news, forums, messages
Re: Passing Variables from a form to an email

Posted by Ian Rutgers on 05/18/06 01:32

"robert" <ab@no.spam-alama-ding-dong> wrote in message
news:r%Mag.32$hN1.10@fe06.lga...
>| // test to see if an email address was posted ... if so the form can be
> | processed
> |
> | if($email_address!=""){
> | $mailout->send();//send email(s)
> | }
> | else{
> | echo "An email address was not entered";
> | }
> | ?>
>
> just add a name to a submit button and set its value to 1. ex.:
>
> <form method=post>
> // your fields for the user to enter data here.
> <input type=submit name=sendIt value=1 />
> </form>
>
> in your php code, first look for:
>
> <?
> $sendIt = $_POST['sendIt'] ? true : false;
>
> if ($sendIt)
> {
> // add validation here to make sure all data is
> // present and not harmful (like email injections, etc.)
> // now, send the mail
> }
> ?>
>
>
Thank's Robert!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация