I need to destroy a session when user leave from a particular page. I use session_destroy() on the end of the page but its not feasible for me because my page h
To trigger when the user actually leaves the page, you must use Javascript to send an asynchronous request back to the server. There's no way for the server to magically know the user has "left" a page.
See http://hideit.siteexperts.com/forums/viewConverse.asp?d_id=20684&Sort=0 .