RE: [PHP-WIN] about session
| From: | Matt Kynaston | Date: | Wed, 25 Sep 2002 08:15:09 +0000 |
| Subject: | RE: [PHP-WIN] about session | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-15997@lists.php.net to get a copy of this message | ||
The browser doesn't communicate anything to the server when the page
unloads, so it's difficult... Have a look at register_shutdown() - you can
use that to call a function when the page finishes processing (or the user
hits 'stop') - not the same as the unload event, but as close as you'll get.
But why do you need to do this? Why can't the script destroy the session
earlier?
Matt
> -----Original Message-----
> From: Sichta Daniel [mailto:Daniel.Sichta@swh.sk]
> Sent: 25 September 2002 07:31
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] about session
>
>
> Hi,
>
> env: WXP prof, php 4.12
>
> I need to destroy session on <body onUnload=""> . Only way I
> can do it (so
> far) is opening new small window on unload event and in this
> new window I
> call session_destroy. Is there any other way ?
>
> DS
>
> mailto:Daniel.Sichta@swh.sk
> <mailto:Daniel.Sichta@swh.sk>
> http://www.swh.sk
> <http://www.swh.sk/>
> ICQ:84700861
>
>
>