in reply to CGI and locking

One neat trick: use Javascript to deactivate the submit button on form submit.

Obviously you need to do something on the server-side as well - because not everyone has Javascript switched on - but this method provides immediate feedback to (most) users and prevents them from even trying to double-submit.

hth,
andy.