[PHP] SESSION var and Objects problem

2012-03-02 Thread Jim Giner
My first foray into classes objects. When retrieving a set of records, I'm using a class to build an object. At this time I save each record/object into a Session array by doing this: $rows = mysql_num_rows($qrslts); if ($rows 0) for ($i=1;$i=$rows;$i++) { $row =

Re: [PHP] SESSION var and Objects problem

2012-03-02 Thread Stuart Dallas
On 2 Mar 2012, at 20:07, Jim Giner wrote: My first foray into classes objects. When retrieving a set of records, I'm using a class to build an object. At this time I save each record/object into a Session array by doing this: $rows = mysql_num_rows($qrslts); if ($rows 0) for

Re: [PHP] SESSION var and Objects problem

2012-03-02 Thread Jim Giner
Yes I ahve the class defined. The classes work in most cases - just this one place where I want to save the objects in a sess var for re-use fails me. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SESSION var and Objects problem

2012-03-02 Thread Stuart Dallas
Please quote the pertinent bit of the message you're replying to, it makes using the list a halluvalot easier and improves SEO for the archives. On 2 Mar 2012, at 20:55, Jim Giner wrote: Yes I ahve the class defined. The classes work in most cases - just this one place where I want to save

Re: [PHP] SESSION var and Objects problem

2012-03-02 Thread Jim Giner
ok - In examinig the objects in the Session after the data has been displayed and the user has hit triggered a re-entry into my script (just one script involved here), the objects in the session array now say [__PHP_Incomplete_Class_Name and __PHP_Incomplete_Class Object . They didn't say

Re: [PHP] SESSION var and Objects problem

2012-03-02 Thread Stuart Dallas
On 2 Mar 2012, at 21:09, Jim Giner wrote: ok - In examinig the objects in the Session after the data has been displayed and the user has hit triggered a re-entry into my script (just one script involved here), the objects in the session array now say [__PHP_Incomplete_Class_Name and

Re: [PHP] SESSION var and Objects problem

2012-03-02 Thread Jim Giner
Stuart Dallas stu...@3ft9.com wrote in message news:7eeba658-c7f6-4449-87bd-aac71b41e...@3ft9.com... Make sure the class is declared before you call session_start. * You Da Man!! I see now why it makes a difference. The session tries to bring back the data but doesn't know how to handle

Re: [PHP] SESSION var and Objects problem

2012-03-02 Thread Simon Schick
Hi, Jim To avoid this kind of problem it would also help to provide an autoloader-function as PHP then tries to load the class-definition by this autoloader ;) Using that you'd bind yourself to have a pretty good system for php-classes and you'd avoid having problems like that. I'd in fact have