Otherwise use what kevin said, but go like this
index.php => do your thing => header to other page saying thank you or something ==> redirect back to the index.php
Also , u can header it back to itself, if I'm not mistaken it will ditch the vars:
Like first time you show thephp file you see the form: you fill in what you need and hit the submit button, you submit it to the same file, do your thing, and use header to reload the page before the page is done loading.. Will look something like:
If (isset = ['variable'])
{
//Do your thing here
//end with:
header("location: $PHP_SELF");
}
// Here you place the forms u need
U understand? First time u see the page, no vars are set, so it skips the if-statement , and loads the forms... When u hit submit a variable is set, if statement is true, thus do your thing, after that, reload the page with the header-command, vars are lost, so the if statement = false, gets skipped and the forms are shown again
I'm not 100% sure if $PHP_SELF will work though :o