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

From: Date: Wed, 03 Dec 2003 00:38:59 +0000
Subject: note 37945 added to function.get-magic-quotes-gpc
Groups: php.notes 
Request: Send a blank email to php-notes+get-61297@lists.php.net to get a copy of this message
To whoever invented the magic_quotes algorithm - I hate you ;) This feature is a pain in the ass for all PHP developers. About every application has to check wether this is set or not and strip_slashes or not variables regarding its setting. If this feature would not have been added a long time ago, everyone could've been told that you'd have to use addslashes to write secure SQL queries and stuff. But now you can not simply use addslashes, because magic_quotes might be in effect, so you have to stripslashes all variables at the beginning of your php file (if enabled) or even worse check and stripslashes each variable on usage. This is a complex issue that truly doesn't make life easier for new and experienced coders and should have been removed with the suberglobals. PS: Just being stuck again in forms that display \' \" sometimes and sometimes not - grah. ---- 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+37945 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37945&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37945&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#61297) next »