I am trying to find a method to execute some PHP code once a user closes the page. In my application, once the user closes or navigates away from the page the server will st
Use the Body attribute onunload
http://www.htmlcodetutorial.com/document/_BODY_onUnload.html