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:[EMAIL PROTECTED]]
> Sent: 25 September 2002 07:31
> To: [EMAIL PROTECTED]
> 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:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> http://www.swh.sk <http://www.swh.sk/>
> ICQ:84700861
>
>
>

Reply via email to