When browser close.How to run sqlk query when browser close in php
===

I have some query regarding browser close issue.

I am using xcart.When user have logged in website and Any situation browser will be closed any so session will be destroyed..and also run the sql query for user status will be offline.

Regards,
Manish Patel