|
Here's an algorythm:
When displaying the form:
1. Generate a unique number and store it in a database table with a timestamp.
2. Delete all unique numbers older than 2 hours.
3. Hide the new unique number in the form.
When processing the form:
1. Check the unique number against the database. If it is not there, die();
2. Check the refferer. If it is incorrect, die();
3. Process the form.
|