note 59515 added to function.stripslashes
| From: | php at baskettcase dot com | Date: | Fri, 09 Dec 2005 00:53:44 +0000 |
| Subject: | note 59515 added to function.stripslashes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99781@lists.php.net to get a copy of this message | ||
array_walk is not used enough. I see several people doing a foreach to strip the slashes on their
post variables, why not do this:
array_walk($_GET, 'stripslashes');
array_walk($_POST, 'stripslashes');
array_walk($_REQUEST, 'stripslashes');
use whichever you normally use in your code.
----
Manual Page -- http://www.php.net/manual/en/function.stripslashes.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59515
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59515&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59515&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59515&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59515&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59515&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59515&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59515&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59515&report=yes
Search -- http://master.php.net/manage/user-notes.php