Re: [PHP] How to prevent duplicate record insertion after refreshing php page

2010-05-19 Thread tedd
At 2:30 PM +0200 5/19/10, Peter Lind wrote: At 5:43 PM +0530 5/19/10, Deva wrote: -snip- Still if I do refresh on thank-you page it adds one more record in database. How to prevent it without token? -- Devendra Jadhav Also, note that you should consider using form tokens, so you don't get cau

Re: [PHP] How to prevent duplicate record insertion after refreshing php page

2010-05-19 Thread Deva
wtf now its working for die() also.. weird need to figure out what happened... On Wed, May 19, 2010 at 6:00 PM, Peter Lind wrote: > On 19 May 2010 14:23, Deva wrote: > > Yeah... Done... Got the solution... > > You need to do exit(0); after the header().. > > die() wont work... > > > > That's ra

Re: [PHP] How to prevent duplicate record insertion after refreshing php page

2010-05-19 Thread Peter Lind
On 19 May 2010 14:23, Deva wrote: > Yeah... Done... Got the solution... > You need to do exit(0); after the header().. > die() wont work... > That's rather odd, according to the docs die() and exit() are equivalent. You're sure nothing else changed? Also, note that you should consider using form

Re: [PHP] How to prevent duplicate record insertion after refreshing php page

2010-05-19 Thread Deva
Yeah... Done... Got the solution... You need to do exit(0); after the header().. die() wont work... On Wed, May 19, 2010 at 5:42 PM, Ashley Sheridan wrote: > On Wed, 2010-05-19 at 17:43 +0530, Deva wrote: > > Hi, > > If I do refresh after submission of a form, records are getting stored > multi

Re: [PHP] How to prevent duplicate record insertion after refreshing php page

2010-05-19 Thread Ashley Sheridan
On Wed, 2010-05-19 at 17:43 +0530, Deva wrote: > Hi, > > If I do refresh after submission of a form, records are getting stored > multiple times. > I have two pages. /submission-form/ and /thank-you/ > I was trying header('Location: /thank-you/'); on submission-form page after > successful valida