Page 1 of 1
Stop resending form information
Posted: Fri May 10, 2002 10:06 am
by brandon
[removed]
This should be fun
Posted: Fri May 10, 2002 11:03 am
by jason
Code: Select all
<?php
if ( isset($_POSTї'submit']) )
{
/* Insert Data Here into Database */
/* Forward your visitors onto the page you want them on */
header("Location: name_of_page");
}
/* Your page or whatever you want. */
?>
Something like this should work.
The key here is the use of header(). Just make sure you are not outputing
anything before this.
Posted: Fri May 10, 2002 2:23 pm
by hob_goblin
i would reccomend making it so posting the name "name" and the message "message" won't work, because some people just like to press the submit button over and over and
name
message
will pop up alot...
also you could just put a little link at the bottom like
<a href="<?=$PHP_SELF;?>">Refresh!</a>
or in php
echo "<a href="$PHP_SELF">Refresh!</a>";
Posted: Fri May 10, 2002 11:58 pm
by lc
Ok I dunno about the code for this cause I dunno about mysql.... but personally I'd just always check the data someone sends with the last data sent.. then in case they send the exact same thing twice... give them a warning or just discard the data.
I mean after a submit get tha data last submitted and do a
if ($newdata != $olddata){
process everything
}
That should be easy enough.