You can have your script check for something such as a session variable, you set
If the variable is set, that means the script has already been run, and more than likely the browser has been refreshed. If that is the case, then you do not proceed with the rest of the script, and either redirect somewhere, or issue a message.
If however the session variable is not present, that means the script is being run for the first time, hence you proceed with it.
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.