PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
How would i be able to update a mysql database field when the user
closes the browser window? And to do this without opening a new window on "unload" in body or somthing like that?
Unfortunately, HTTP is stateless, and as such, you have to assume that sessions are open-ended. You've hit on the only solution, opening a document on unload(), but that is far from garaunteed to work. There is no reliable solution.