Re: Re: Using sessions with register globals off
| From: | John Nichel | Date: | Thu, 05 Feb 2004 17:23:51 +0000 |
| Subject: | Re: Re: Using sessions with register globals off | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-176917@lists.php.net to get a copy of this message | ||
Randall Perry wrote:
Ok, with register globals on, this works ('order' being a php object):session_name('name'); session_register('order');$order->print_something();With with register globals off, this fails:session_name('name'); $order = $_SESSION['order'];
Where do you assign $_SESSION['order'] a value? -- By-Tor.com It's all about the Rush http://www.by-tor.com$order->print_something();Get the errors:PHP Notice: Undefined variable: _SESSION PHP Fatal error: Call to undefined function: print_something()Meaning the _SESSION arr is not recognized and the $order obj variable has not been passed. What am I missing?