Reply to Re: Form Help Again

Your name:

Reply:


Posted by Gordon Burditt on 06/25/06 03:56

In article <s0vr92595u2t52tncv2h0f822cttrichhc@4ax.com>,
Hoopster <hoops_nospam444@aol.com> wrote:
>Here is my form.
>
>
><form action="http://www.johndoe.com/FormToEmail.php" method="post"
>enctype="multipart/form-data">
><input class="sidebar" value="name" name="user" >
><input class="sidebar" value="email" name="email" > <TEXTAREA
>class=sidebar name=content rows=40 cols=30></TEXTAREA>
><input class="button_sidebar" value="Send" type="submit" >
><input class="button_sidebar" value="Reset" type="reset" >
></form>
>
>
>
>I then have a PHP file called FormToEmail.php
>
>
>It looks like this:
>
>
>$my_email = "johndoe@aol.com";
>
>
>
>
>And some other garbage at the bottom. For some reason my form goes to
>the FormToEmail.php page, but I never get any emails with the data.

If you wish to send mail, you have to actually *WRITE CODE* to *SEND
THE MAIL*. Often this is a call to the PHP mail() function, or
invoking classes to send mail. All the above does is set an unused
variable.

Some security tips:

Never let the PHP use user-supplied or form-supplied values (stuff
from $_GET[], $_POST[], etc.) for mail headers (e.g. Subject:, To:,
From:, etc.) without first ensuring that the value does NOT contain
a carriage return or line feed. Never let the user or form specify
the destination of the email.

Gordon L. Burditt

[Back to original 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

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