You can't do anything about with PHP, because by the time someone is clicking a button the PHP is done parsting but I used to use a javascript function to accomplish that.
Basically add an onClick event to the submit button that makes "form.submitbuttonname.enabled = false".
There is a convoluted function, on Dynamicdrive.com I think, that does the same thing but onSubmit event instead.