note 52090 added to function.get-magic-quotes-gpc

From: Date: Thu, 21 Apr 2005 00:13:26 +0000
Subject: note 52090 added to function.get-magic-quotes-gpc
Groups: php.notes 
Request: Send a blank email to php-notes+get-88301@lists.php.net to get a copy of this message
This is the most common solution to the problem mentioned above. function stripslashes_deep($value) { return (is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value)); } if (get_magic_quotes_gpc()) { $_GET = array_map('stripslashes_deep', $_GET); $_POST = array_map('stripslashes_deep', $_POST); $_COOKIE = array_map('stripslashes_deep', $_COOKIE); } ---- Manual Page -- http://www.php.net/manual/en/function.get-magic-quotes-gpc.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+52090 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52090&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52090&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52090&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52090&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52090&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+52090&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#88301) next »