Reply to Re: newbie: session_start() question

Your name:

Reply:


Posted by Ric on 01/03/07 00:29

Jeff schrieb:
> 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?

It doesn't create a new session if there is already a session, see PHP
manual page session_start:

"Note: As of PHP 4.3.3, calling session_start() while the session has
already been started will result in an error of level E_NOTICE. Also,
the second session start will simply be ignored."

>
> 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?
>
> Jeff
>
>

[Back to original 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

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