Reply to Re: logout script

Your name:

Reply:


Posted by Jerry Stuckle on 04/15/07 14:35

Tyno Gendo wrote:
> Schraalhans Keukenmeester wrote:
>> FrobinRobin wrote:
>>> On 13 Apr, 20:48, Schraalhans Keukenmeester <bitbuc...@invalid.spam>
>>> wrote:
>>>> Tyno Gendo wrote:
>>>>> pank wrote:
>>>>>> hey guys ...
>>>>>> can anybody tell me a php logout script.
>>>>>> I want to log out from one page which i was developing ,
>>>>>> i tried but it's not working. I have tried
>>>>>> session_destroy(),session_unset() functions
>>>>>> but they are not working.
>>>>>> If any one is having that script then please help me .
>>>>> Session_destroy should destroy all variables you have set in $_SESSION
>>>> No it does NOT. They are valid as long as the script runs. A call to
>>>> $_SESSIONS=array(); after the session_destroy() clears the session
>>>> variables.
>
> Indeed. I've only ever used session_destroy() as the last statement
> before quitting the page, so I never noticed. Seems a bit crap, after
> all, you're asking it to 'destroy' the session, does anyone have a use
> for destroying it and _still_ retaining the variables until script end?

I never destroy a session. Rather, I unset variables which are no
longer needed. Destroying a session might make other pages start to fail
because of session variables they use.

And maybe the site doesn't have this potential problem now - but what
about later? It's things like this which take hours (or days) to track
down.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[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

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