Re: Having trouble with a form to mail script.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/3/21 Linda Stark <nadsab1@xxxxxxxx>:
>
>
> I’m not sure if I am
> in the right forum but thought I would give this a shot…
>

Sure, you are

>
> I just
> created a new mail form in Dreamweaver for a web site.  I’m
> working on a form to mail script that I started after reading a few on line tutorials, and can’t seem to get right. When I run
> this little test script (named sendmail2.php) from the tutorial, on my server,
> just to make sure PHP is working OK for web email forms:
>
>
> <?php
>
> $email = $_REQUEST['email'] ;
>
> $message = $_REQUEST['message'] ;
>
> mail( "help@xxxxxxxxxxxx", "Feedback Form Results",
>
> $message, "From: $email" );
>



I didn't dig through all the answers, but I felt that it might be
useful to mention, that you should avoid using mail() with unfiltered
user-input.
Especially the additional headers you're passing to mail() as the
fourth parameter can be exploited to send spam with your form.

Please filter your variables and discard CR, LF from the vars passed
to the header.

See http://www.google.de/search?q=mail()+header+injection


byebye,

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux