|
Posted by erstazi9 on 05/09/07 19:44
On May 9, 7:52 am, ABC <raghuana...@gmail.com> wrote:
> On May 7, 7:26 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>
>
>
> > ABC wrote:
> > > Hi,
>
> > > I have a problem with Double submission in html forms.
> > > I am using PHP as the server side scripting language, i have found a
> > > means to capture the second form submission while the first form
> > > submission is still in-progress. Basically, i can use sessions to
> > > check if the first submission is active and reject subsequent submits.
>
> > > ***I do not want to try any client side solution(such as disabling
> > > submit button) as hitting F5 on the screen will re-post the data
> > > again.
>
> > > My question is :
> > > (*) if i send some kind of output to the browser telling the user
> > > that a previous session is active, then how do i ensure that the first
> > > form submission's output is displayed to the user on the browser
> > > window?
>
> > > I tried, print messages like- Please wait. But somehow the first form
> > > submission's output is not printed...I am guessing the browser closes
> > > the connection after the second submission's output is received and
> > > first submission has no where to send the output.
>
> > > I hope, i have been able to express my problem clearly.
>
> > > Please help!
>
> > > Raghu
>
> > Hmmm, let's see.
>
> > How about the page you're posting to outputs a "Please wait" and flushes
> > the output, then starts processing. Might not work in all browsers -
> > but in most it should clear the screen and give the "please wait" message.
>
> > --
> > ==================
> > Remove the "x" from my email address
> > Jerry Stuckle
> > JDS Computer Training Corp.
> > jstuck...@attglobal.net
> > ==================- Hide quoted text -
>
> > - Show quoted text -
>
> Hi Thanks for your help so far,
>
> I have heard the struts framework supports Synchronizer token pattern
> to handle this kind of problem.
> But didnt understand it well. I suppose this is a common problem
> encountered..
>
> Do let me know your thoughts on this...
Personally, when a form is submitted, I have it directed to a page
that displays no html, and does the server-side verification and
inserts into DB and _then_ I use header("Location: /address/to/
thankyou/"); where it will display information about what will be done
with the information, a thank you bit, and an email will be sent. This
avoids Refresh/Double Submit problem because the back button will
direct them to the form!
Navigation:
[Reply to this message]
|