|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
only one insert
Is it possible to insert data into DB only once ? I have PHP script for insert data. When I press F5 (update) in my WWW browser, script will reload and run again inserting data twice. Any solutions ?
|
|
#2
|
||||
|
||||
|
RE: only one insert
You can prevent double inserts in a number of ways.
First you could use a meta redirect to get off the page with the query so after you have uploaded you redirect the user to another page. Second you can verify that the record doesn't already exist in the db before inserting and kick back an error if it was already there. There are more ways than these two but one of these will probably solve your problem. B B |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > only one insert |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|