note 35544 deleted from security.registerglobals by vincent

From: Date: Sat, 06 Sep 2003 09:35:53 +0000
Subject: note 35544 deleted from security.registerglobals by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-55533@lists.php.net to get a copy of this message
Note Submitter: maxwell_smart at thepentagon dot com ---- I disagree. register_globals is wonderful. It doesn't produce bad code, bad coders produce bad code! When on a page, it usually does not matter where the data came from. If it does, simply refer to it by it's full address, including the array that stores it. That is, if the session defines a default that cannot be overridden, simply refer to it as $_SESSION["Variable"], and it cannot be overridden. Conversely, if register_globals is off, getting variables can be a hassle. For example, say a form POSTs data to a page, but you want to let the user pass it as a GET manually, should they so wish. Turning register_globals means that the page needs to be go through each array to set another variable that holds the default. This gets especially confusing when they conflict with a session or the like, where some stored values are not to be changed, and others are meant to be mere defaults.

« previous php.notes (#55533) next »