How to run a code after a specified time?
<p>I have a big problem:</p>

<p>A user logs in, and the session opens.
After that he clicks a button (in a form) which action is "example.php".
This example.php should increase one record in MySQL database by 1.</p>

<p>How to write this "example.php"?
Please help.</p>

<p>EDIT:
Sorry, I haven't asked what i was supposed to ask.</p>

<p>Main problem:</p>

<p>After a user clicks a button, the example.php script should execute after a specified time, for example, a 600 sec.</p>

<p>The other problem is that the user can click the button and log out, and despite that, the example.php should execute 600 sec later.</p>

<p>EDIT (18:48):
OK, I've read all your suggestions, but dont't have an idea how to make all of this things work together.</p>

<p>I made a form.php, with input type="submit" and action="example.php".
I want to:
 1. start a javascript timer;
 2. increase a value in database after a time, specified earlier in a variable.</p>

<p>Please, if it is possible, give me an example, how to do this.</p>
