[PHP] Re: Class variable value lost

2009-09-09 Thread Shawn McKenzie
Sumit Sharma wrote: Hi, I have developed a listing site which is totally class based. Now when it authenticates a user login and set appropriate class variables to true and set user info in user class variables, value of all the set variables are lost when I forward the user to members

Re: [PHP] Re: Class variable value lost

2009-09-09 Thread Ashley Sheridan
On Wed, 2009-09-09 at 10:36 -0500, Shawn McKenzie wrote: Sumit Sharma wrote: Hi, I have developed a listing site which is totally class based. Now when it authenticates a user login and set appropriate class variables to true and set user info in user class variables, value of all the

Fwd: [PHP] Re: Class variable value lost

2009-09-09 Thread Sumit Sharma
-- From: Ashley Sheridan a...@ashleysheridan.co.uk Date: Wed, Sep 9, 2009 at 9:14 PM Subject: Re: [PHP] Re: Class variable value lost To: Shawn McKenzie nos...@mckenzies.net Cc: Sumit Sharma sumitp...@gmail.com, PHP General Mailing List php-general@lists.php.net On Wed, 2009-09-09 at 10:36 -0500, Shawn

Re: [PHP] Re: Class variable value lost

2009-09-09 Thread Andrew Ballard
On Wed, Sep 9, 2009 at 11:58 AM, Sumit Sharma sumitp...@gmail.com wrote: What I have done is declared one User class in a separate file and created its object there only. After this included this file in all other file which are using its object. So the object is creating only once and included

Re: [PHP] Re: Class variable value lost

2009-09-09 Thread Martin Scotta
issue than setting $_SESSION variables. -- Forwarded message -- From: Ashley Sheridan a...@ashleysheridan.co.uk Date: Wed, Sep 9, 2009 at 9:14 PM Subject: Re: [PHP] Re: Class variable value lost To: Shawn McKenzie nos...@mckenzies.net Cc: Sumit Sharma sumitp...@gmail.com, PHP

Re: Fwd: [PHP] Re: Class variable value lost

2009-09-09 Thread Shawn McKenzie
Sumit Sharma wrote: What I have done is declared one User class in a separate file and created its object there only. After this included this file in all other file which are using its object. So the object is creating only once and included in every other file only once. Now when I over

Re: [PHP] Re: Class variable value lost

2009-09-09 Thread Ben Dunlap
The object only exists for that instance of the script, so when the user navigates to the next page, the object is freed up from the memory. There are a couple of ways you could get round this:      * don't navigate away from the page, and use AJAX calls to update        parts of the page