preventing page from resubmitting when refreshing page

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

 



I have a page that has a form on the first part that posts to itself and
dumps the contents of the form into a database.

All this is well and good - I'm using

if ($_POST['submit']) {


}

to detect the submission and everything is doing as it should.

Thing is if you refresh the page that displays the results it then posts to
the database again. I've tried some error trapping but in the same way the
page hold the post variables it just redoes what it has done rather than re
running the script.

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

any help would be appreciated.

cheers
mikek
-- 
Mike Karthauser 
Managing Director - Brightstorm Ltd

Email       >> mikek@brightstorm.co.uk
Web         >> http://www.brightstorm.co.uk
Tel         >> 0117 9426653 (office)
               07939 252144 (mobile)

Snailmail   >> Unit 8, 14 King Square,
               Bristol BS2 8JJ


-- 
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