Re: preventing page from resubmitting when refreshing page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Is there something i can do on browser refresh to prevent this or prevent my
> mysql database from duplicating the records?

Instead of using INSERT in your query use REPLACE INTO.
Alternately, after you are done processing the form, do this:

header( "location: $PHP_SELF?$QUERY_STRING" );
exit()

So the page will redirect to itself and it'll be like you went to it
the first time.

These are just two of I'm sure the many other options what will
come through.

Chris


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux