Reply to Re: [PHP] Re-initiating an autostarted session

Your name:

Reply:


Posted by Jason Barnett on 05/16/05 18:24

Ville Mattila wrote:
> Marek Kilimajer wrote:
>
>> You are right, unset($_COOKIES) does not remove cookie from the client.
>>
>> You need to unset() it so that your next call to session_start() does
>> not use the same $_COOKIES[session_name()]. session_start will
>> generate new session id if there is not one set in the request variables.
>
>
> I see, thanks! I tried unsetting the cookies and request superglobals,
> but it still does not give a new session id.
>
> unset($_COOKIES[session_name()]);
> unset($_REQUEST[session_name()]);
> session_destroy();
> session_start();
> session_write_close();
>

But this code *still* does not destroy the cookie on the client side.
Are you doing that somewhere else?

http://php.net/manual/en/function.session-destroy.php
http://php.net/manual/en/function.setcookie.php

[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

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