You are here: Re: newbie: session_start() question « PHP Language « IT news, forums, messages
Re: newbie: session_start() question

Posted by Rik on 01/03/07 00:45

Jeff wrote:
> Hey
>
> I'm using php version 5.2.0
>
> I'm wondering how we can tell if session_start are resuming the
> current session id or if it just created a new session?
>
> I know I could for example do a test like this:
> $_SESSION["valid_user"] == NULL (not sure about the syntax).. but
> there must be a better way to determine if session_start() starts a
> new session or not?

If you don't really care about people 'faking' it:
isset($_REQUEST[session_name()]):

Offcourse, use _before_ you call session_start();
--
Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация