a simple clarification about $_SESSION

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
If I define

and later, use $x say, as,

$y = $x * $x;

will it work only if register_globals is set to On?

Am i correct in saying that usage of $x in place of $_SESSION['x'] will
not work if register_globals is Off?

Joseph S.

Re: a simple clarification about $_SESSION

Joseph S. wrote:

Quoted text here. Click to load it

You are.

Of course, you could just add this line to your code:

    $x = $_SESSION['x'];

and then you can use $x in place of $_SESSION['x'].

Toby A Inkster BSc (Hons) ARCS
Contact Me  ~ http://tobyinkster.co.uk/contact

Site Timeline