note 55346 added to function.eregi-replace
| From: | carlos at braziland dot com | Date: | Sun, 31 Jul 2005 19:53:41 +0000 |
| Subject: | note 55346 added to function.eregi-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-92838@lists.php.net to get a copy of this message | ||
So here is my answer to those who are trying to submit headers through my simple contact form:
[code]$any_form_field =
eregi_replace("@","[at]",$_POST['just_one_field']); //how can anyone
send emails to other email addresses without the @ symbol :)[/code]
My suggestion is to do a foreach loop in the $_POST array and remove the @ symbol from all fields
(unless you want one of the fields to have the @ symbol, in which case it should be very careful and
question if the symbol is necessary).
Not the best solution, but it's simple and it works.
----
Submitter IP: 12.160.245.96
----
Manual Page -- http://www.php.net/manual/en/function.eregi-replace.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55346
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55346&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55346&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55346&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55346&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55346&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55346&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55346&report=yes
Search -- http://master.php.net/manage/user-notes.php