[Pugged] sessions in includes
ciapug@ciapug.org
ciapug@ciapug.org
Tue, 21 Jan 2003 15:07:42 -0500
Sorry for the severe snipping below. Yes, that is in php.ini. I would strongly
encourage you to use the new variables for post and get instead of turning on
register_globals. It's a simple conversion, promotes bett coding habits, and
doesn't compromise your security.
Say you have form fields you would normally retrieve as $name $address and
$zip.
It's still easy to snag them with register_globals off by using the newer
variables thusly:
$_POST['name'] $_POST['address'] and $_POST['zip']
Use $_GET if your method is get instead of post. Yeah, it's a little more
typing, but at the same time more legible to another developer coming into the
project after you, and just good, sensible code. There's no mistaking where
those variables were set.
Might just be me, but then the PHP group made this behavior default, so I
don't think I'm alone in preferring it. ;)
Chris Van Cleve
Quoting Angie Tollerson <tollerson@alliancetechnologies.net>:
> Hmmm,
> is that setting in php.ini? Becaues I don't have access to that, this is
> hosted by an outside party in Canada.
> Angie
>
>
> Try this setting and see if it works for you:
>
> register_globals = On