Re: Migration from register_globals=on to register_globals=off

From: Date: Tue, 03 Jun 2003 16:54:03 +0000
Subject: Re: Migration from register_globals=on to register_globals=off
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-150011@lists.php.net to get a copy of this message
on top of your script add extract ($_POST); or may be a little more checking to see if its actually a form submission by POST method like if ($_SERVER["REQUEST_METHOD"] == 'POST') extract($_POST); same thing goes for GET Then you can access all form variables just as you were accessing. HTH R'twick "ØYstein HåLand" <ha@ematte.se> wrote in message news:20030603160229.97136.qmail@pb1.pair.com... > I'm not sure what you mean. To give ONE example: > Earlier I could use this code on top of every page: > if ($printout != "yeah") { include("header.php"); } > This code gives an error today. The variable $printout is set if the visitor > choose to click on the 'print_page_image', otherwise the variable has no > value. > > "Esteban FernáNdez" <efernandez@tecsol.cl> skrev i meddelandet > news:20030603154909.78521.qmail@pb1.pair.com... > > When you recivied that error ?, in a form ?, if is in a Form just put in > the > > top of .php files this code > > > > $HTTP_GET_VARS["variable2"]; > > $HTTP_GET_VARS["variable3"]; > > > > Of course if you send with other method (post) change the GET for POST > > > > $HTTP_POS_VARS["variable2"]; > > $HTTP_POS_VARS["variable3"]; > > > > Regards. > > > > Esteban. > > > > > > > > "ØYstein HåLand" <ha@ematte.se> escribió en el mensaje > > news:20030603150831.24991.qmail@pb1.pair.com... > > > None of my old scripts worx nowadays and the most common error message > is > > > 'undefined variable'. What is the best/simplest way to work around this > > > situation? > > > if !isset($myvar) { > > > do this > > > blah blah > > > } > > > ? > > > > > > > > > > > >

« previous php.general (#150011) next »