Prevent the second form-submit on server side

Hi,

I want to prevent users from re-submitting a form.
Disabling the submit button would be a simple solution but not perfect.

A better solution would be using session/cookie on the server side.
I want to know if there's a plugin for that before I reinvent the wheel.

Thanks.

Sam