On Friday 03 January 2003 14:40, Ken Nagorski wrote: > Hi there, > > I am totally new at classes and oop... I have never done any object > oriented stuff before so I don't know if my question is a php one, a > browser issue or an oop one but here goes. I am writing a class that deals > with members for a site (I know there are examples on the web, I have used > pieces parts from them...) and things seem to be going ok (actually better > than OK, I have totally amazed myself so far). but I have one issue. I have > a function in the class that returns the session ID if there is a valid > session. otherwise it returns 0. This function works fine in IE6 however > fails in mozilla or lynx. I have NO idea why and can't seem to figure out > where to even start.
As always, the best thing to do when code doesn't behave as expected is to start printing out variables to see whether they contain what you expect them to contain ... > I would really appreciate any advice. I have included the code snippits > below. > > -- from class.session_logger.php ------------------ > function is_logged_in() > { > session_start(); > $this->current_session_id=session_id(); ... eg what does $this-current_session_id contain now? Most likely it is empty, ... > $session_logger = new session_logger; > $session_id=$session_logger->is_logged_in(); > //echos the session id in IE6, echos 0 in Mozilla ??? > echo("<B> la la la $session_id</B>><br>"); ... probably because Mozilla is not accepting cookies? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* If you sit down at a poker game and don't see a sucker, get up. You're the sucker. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php