Re: Session help please?
| From: | Chris Shiflett | Date: | Fri, 02 Apr 2004 03:06:31 +0000 |
| Subject: | Re: Session help please? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182084@lists.php.net to get a copy of this message | ||
--- Paul <pfine@of-law.com> wrote:
> I figured I could do something like $_SESSION['test'] = 5 and refer to
> $test on other pages however I cannot. The reason I thought I could do
> this is because I can do $_SESSION['test'] = $_POST['test'] and be able
> to refer to just $test on other pages.
This is because you probably have register_globals enabled, so the value
of "test" in the user POST request is available to you as both:
$_POST['test']
and
$test
It has nothing to do with you also setting $_SESSION['test'].
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security - O'Reilly
Coming Fall 2004
HTTP Developer's Handbook - Sams
http://httphandbook.org/
PHP Community Site
http://phpcommunity.org/