This question is probably in the top 5 most asked.
There are lots of ways of doing what you want. My personal preference is to use sessions to register a flag when the form is submitten. Then all you do is something like this.
if($HasBeenSubmitted==TRUE){
print("Oi! stop it yer bugger")
} else dubmit the data
Do a search, you'll find lots on this subject.
Nick