note 47205 added to security.globals

From: Date: Fri, 05 Nov 2004 21:11:10 +0000
Subject: note 47205 added to security.globals
Groups: php.notes 
Request: Send a blank email to php-notes+get-80179@lists.php.net to get a copy of this message
If you don't access to your PHP confoguration file (e.g. you are using a hosting services), your server may set the register globals to off. In this case, you still can use the short form of variables, by placing this code on the top of your page: <?php # This would be useful for POST method foreach ($_POST as $key=>$value) { $$key = $value; } ?> <?php # This would be useful for GET method foreach ($_GET as $key=>$value) { $$key = $value; } ?> Happy PHPing! Amir Hosein Rushenas ---- Manual Page -- http://www.php.net/manual/en/security.globals.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47205 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47205&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47205&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47205&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47205&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47205&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47205&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47205&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#80179) next »