Thanks for the tips, Justin. Sounds like a good idea. Do you, or anyone, know if the $_POST vars stay defined even after moving on to another page? Do I also need to unset $_POST after passing the vars each time?
> From: [EMAIL PROTECTED] (Justin French) > Newsgroups: php.general > Date: Sat, 03 Aug 2002 15:46:57 +1000 > To: Monty <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> > Subject: Re: [PHP] Re: Need Help with register_globals OFF >> >> Anyone want to share any tips on how to deal with form vars passed to a >> script with register_globals turned off? Do you simply refer to them >> directly with $_GET['var'] or do you initialize vars locally that contain >> all the $_GET vars? > > Well I usually choose to POST forms, not GET them, but yeah, I just deal > with the vars as $_POST['var']. > > If I'm referencing the vars a LOT, I make regular $vars out of each element > in the POST array: > > $myvar = $_POST['myvar']; > > > If there's a lot of them, I do it with a foreach loop... something like: > > <? > foreach($_POST as $key => $value) > { > $$key = $value; > } > ?> > > ...will do the trick. It achieves the same as register_globals, but only > from one source, the POST array. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php