How to insert php code before closing a window exit button
That is a real challenge. The ‘x’ in the right upper corner will terminate the browser so you need to intercept this with javascript. But the only way to do some php stuff is to call something in this script, but as the browser is closing, nothing can be displayed. I don’t have experiences with this, but next site might give you some samples to start of with…