I've got the following issue:
I'd like to execute an AJAX request through JS, which would call the mysql query and clear some data in database(UPDATE and stuff,whatever) when user is leaving my web page.
Does anyone have any ideas how to do such thing?
I mean I'm only missing one piece of the whole process: JavaScript function(event or something).