Is this possible?
Moderator: General Moderators
Is this possible?
I'm wanting to design a php script that will run when a user closes out of a window. I'm going to use it so if a user closes out of a battle before winning/losing, it will automatically check and delete his account. Is this in any way possible?
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Surely a better way of doing this would just be to record the time a battle starts, and if its not ended within a set period assume something has gone wrong. If it happens more than a couple of times, then you inform the user that their account isn't registering the results of battles correctly and ask them to fix it. If it carries on yet further, then you disable their account.
Quite a bit of work there though..
EDIT: Thinking about it, you don't need to do all that. Just record that the user has a battle in progress, and don't let them start another one until that battle has finished, or if they admit defeat in it. So if they close the window before the battle is over the only way they can have another one is to admit they lost.
Quite a bit of work there though..
EDIT: Thinking about it, you don't need to do all that. Just record that the user has a battle in progress, and don't let them start another one until that battle has finished, or if they admit defeat in it. So if they close the window before the battle is over the only way they can have another one is to admit they lost.