Re: Problems with $_POST
| From: | Reidar Solberg | Date: | Wed, 21 Jan 2004 17:08:03 +0000 |
| Subject: | Re: Problems with $_POST | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175316@lists.php.net to get a copy of this message | ||
Thank you all for answers - I've got one problem less!!!
- Reidar
"Binay" <binay@oliveinternet.com> skrev i melding
news:002c01c3dff7$ce2bd0c0$7201a8c0@olv...
Hi
What is the primary key in your tble? Using tht primary key check for
duplicate entry... Theres no way u can change the posted data ... so even if
u reset $_POST['submit'] after the insert operation is done, next time u
refresh it will be set and hence will duplicate...so check for duplicate
entries urself only based on primary key or unique values in ur table.
Hope this helps
Cheers
Binay
U wrote..
<
I have a FORM for entering data into a DB.
I use:
...
...
if ($_POST['submit'] == 'Register') {
...
code for INSERT into DB.
This works OK, but if I REFRESH the page, it duplicates the "dataset" in
the table.
How can I reset $_POST['submit'] so it don't make this happen?
Rgds
Reidar Solberg
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php