note 101596 added to faq.misc

From: Date: Wed, 29 Dec 2010 01:41:57 +0000
Subject: note 101596 added to faq.misc
Groups: php.notes 
Request: Send a blank email to php-notes+get-175289@lists.php.net to get a copy of this message
If you only needed register_globals for get/post variables, the effictive solution for 5.3 is: import_request_variables("GPC", ""); But if the skripts relied on session_register() you'll have to do more: - Replace all variables that appeared after session_register with _SESSION equivalents - so $myvar becomes $_SESSION['myvar'] - Take care if your variables appeared inside strings - 'Hello $user !' works, but 'Hello $_SESSION['user'] !' not - so you have to concatenate the string: 'Hello '.$_SESSION['user'] .' !' - Session variables in function declarations (for whatever purpose) will not work - keeping the old (local) names will work in most cases. - Finally, replace the session_register(..) line with session_start() ---- Server IP: 69.147.83.197 Probable Submitter: 92.195.101.132 ---- Manual Page -- http://www.php.net/manual/en/faq.misc.php Edit -- https://master.php.net/note/edit/101596 Del: integrated -- https://master.php.net/note/delete/101596/integrated Del: useless -- https://master.php.net/note/delete/101596/useless Del: bad code -- https://master.php.net/note/delete/101596/bad+code Del: spam -- https://master.php.net/note/delete/101596/spam Del: non-english -- https://master.php.net/note/delete/101596/non-english Del: in docs -- https://master.php.net/note/delete/101596/in+docs Del: other reasons-- https://master.php.net/note/delete/101596 Reject -- https://master.php.net/note/reject/101596 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#175289) next »