Viciouse Circle !

Discussion in 'HTML' started by Mel Smith, Aug 4, 2010.

  1. Mel Smith

    Mel Smith Guest

    Hi:

    Basic Question:

    How do I stop multiple 'Submits'

    Explanation:

    My futures users will Submit a form. When this form is 'accepted' on my
    server, and when it is 'Confirmed' and validated on my server, and when it
    is saved away on a server database, then I *don't want* my users to
    re-submit the *same* form by accident (e.g., if they use the Back Button to
    return to the 'Submit' screen and then press the 'Submit Button' again, I
    get into a vicious circle of Submit, Confirm, and Save Away).

    How can I thwart this multiple submit cycle please ??

    Thanks for any thoughts.

    --
    Mel Smith
    Mel Smith, Aug 4, 2010
    #1
    1. Advertising

  2. Mel Smith wrote:
    > Hi:
    >
    > Basic Question:
    >
    > How do I stop multiple 'Submits'
    >
    > Explanation:
    >
    > My futures users will Submit a form. When this form is 'accepted' on my
    > server, and when it is 'Confirmed' and validated on my server, and when it
    > is saved away on a server database, then I *don't want* my users to
    > re-submit the *same* form by accident (e.g., if they use the Back Button to
    > return to the 'Submit' screen and then press the 'Submit Button' again, I
    > get into a vicious circle of Submit, Confirm, and Save Away).
    >
    > How can I thwart this multiple submit cycle please ??
    >
    > Thanks for any thoughts.
    >


    <http://lmgtfy.com?q=php+prevent+multiple+submissions>

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Aug 4, 2010
    #2
    1. Advertising

  3. Mel Smith

    Mel Smith Guest

    Jonathan said:
    >> How can I thwart this multiple submit cycle please ??
    >>
    >> Thanks for any thoughts.
    >>

    >


    > <http://lmgtfy.com?q=php+prevent+multiple+submissions>


    Jonathan:

    That link was very enlightening. Thank you

    (I believe I'll use both the Submit Button 'disabled' propert, and
    change the nvalue of the Submit Button, *and* create and use a session
    variable to prevent multi-submits.


    Thanks again !

    -Mel
    Mel Smith, Aug 4, 2010
    #3
  4. Mel Smith

    Mel Smith Guest

    Jonathan:

    >
    > <http://lmgtfy.com?q=php+prevent+multiple+submissions>
    >


    I tried the technique of disabling the 'Submit' Button and changing its
    value to 'Already Submitted' -- during the Validate sequence.

    However, when the user hits the back buton to the original version of
    the 'submit' page, he sees the submit button *enabled* again with the
    original value.

    So, I guess there's no way I can alter the historical version of this
    page in his cache ??

    I guess what I have to do is check for a complete duplicate in the input
    form before adding the info from this re-sent page to my database. Damn !

    Anyway, Thank You for the link suggestions.

    -Mel Smith
    Mel Smith, Aug 4, 2010
    #4
  5. Mel Smith wrote:
    > Jonathan:
    >
    >>
    >> <http://lmgtfy.com?q=php+prevent+multiple+submissions>
    >>

    >
    > I tried the technique of disabling the 'Submit' Button and changing its
    > value to 'Already Submitted' -- during the Validate sequence.


    Not the JavaScript part. JavaScript can always be circumvented. Focus on
    the PHP part and a session cookie.


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Aug 4, 2010
    #5
  6. Mel Smith

    Mel Smith Guest

    Jonathan said

    > Not the JavaScript part. JavaScript can always be circumvented. Focus on
    > the PHP part and a session cookie.
    >


    Altho I used a c++ proggie as aa cgi script, I have successfully modified my
    program to tell the user he attempted to duplicate his previous submission.

    It seems to work !

    Thank you

    -Mel
    Mel Smith, Aug 4, 2010
    #6
  7. On Wed, 4 Aug 2010 14:16:44 -0600, "Mel Smith"
    <> wrote:

    >Jonathan said
    >
    >> Not the JavaScript part. JavaScript can always be circumvented. Focus on
    >> the PHP part and a session cookie.
    >>

    >
    >Altho I used a c++ proggie as aa cgi script, I have successfully modified my
    >program to tell the user he attempted to duplicate his previous submission.
    >
    > It seems to work !
    >

    That's the best way of doing it - avoiding an identical post.
    Raymond Schmit, Aug 4, 2010
    #7
  8. Mel Smith

    rf Guest

    "Mel Smith" <> wrote in message
    news:...
    > Jonathan:
    >
    >>
    >> <http://lmgtfy.com?q=php+prevent+multiple+submissions>
    >>

    >
    > I tried the technique of disabling the 'Submit' Button and changing its
    > value to 'Already Submitted' -- during the Validate sequence.
    >
    > However, when the user hits the back buton to the original version of
    > the 'submit' page, he sees the submit button *enabled* again with the
    > original value.


    When the form is submitted and the input processed cause your server side
    script to redirect, using a Location: header, to the same page (with all the
    input fields blank of course). That way there is no "back" page in the
    browsers history with those input fields filled in, so there is no chance of
    a duplicate submit. And you never get that annoying question about
    re-submitting the form information again.

    > So, I guess there's no way I can alter the historical version of this
    > page in his cache ??


    Yes there is. See above.

    > I guess what I have to do is check for a complete duplicate in the
    > input form before adding the info from this re-sent page to my database.
    > Damn !


    Probably a good idea anyway, the user just might fill in exactly the same
    information a second time.
    rf, Aug 5, 2010
    #8
  9. Mel Smith

    Mel Smith Guest

    RF said:

    > When the form is submitted and the input processed cause your server side
    > script to redirect, using a Location: header, to the same page (with all
    > the input fields blank of course). That way there is no "back" page in the
    > browsers history with those input fields filled in, so there is no chance
    > of a duplicate submit. And you never get that annoying question about
    > re-submitting the form information again.
    >
    >> So, I guess there's no way I can alter the historical version of this
    >> page in his cache ??

    >
    > Yes there is. See above.
    >
    >> I guess what I have to do is check for a complete duplicate in the
    >> input form before adding the info from this re-sent page to my database.
    >> Damn !

    >
    > Probably a good idea anyway, the user just might fill in exactly the same
    > information a second time.
    >
    >


    rf:
    Thanks for the *further* guidance/suggestion above. I'll mull on it over
    the next few days.

    -Mel
    Mel Smith, Aug 5, 2010
    #9
  10. Mel Smith

    William Gill Guest

    On 8/4/2010 9:01 PM, rf wrote:

    > When the form is submitted and the input processed cause your server side
    > script to redirect, using a Location: header, to the same page (with all the
    > input fields blank of course). That way there is no "back" page in the
    > browsers history with those input fields filled in, so there is no chance of
    > a duplicate submit. And you never get that annoying question about
    > re-submitting the form information again.
    >


    Being presented with the original (blank) form, many users will assume
    they or the program reset the form, and dutifully refill and resubmit it
    at least one more time.

    I usually redirect them to a confirmation ("Thank you we'll get back to
    you...") screen. In PHP this can be done by making the script the
    target of the form's action, and performing an if test for the submit
    variable to determine whether to output the form or the thank you.

    I haven't played with it, but I would think a session variable could be
    similarly used to address back button issues. i.e. set a session
    variable with a time-stamp when originally submitted and testing to see
    if the resubmit is delayed sufficiently to indicate an intentional
    resubmission (correction?).
    William Gill, Aug 7, 2010
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Talon

    Circle Hell

    Talon, Sep 4, 2003, in forum: Perl
    Replies:
    2
    Views:
    1,085
    Mark Carter
    Sep 4, 2003
  2. =?Utf-8?B?dGFnaHJlZWQ=?=

    moving label in c# around circle

    =?Utf-8?B?dGFnaHJlZWQ=?=, May 2, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,784
    clintonG
    May 3, 2004
  3. =?Utf-8?B?Rmxhc2ggaW4gU21hcnQgZGV2aWNlIEFwcGxu?=

    Create circle in webform

    =?Utf-8?B?Rmxhc2ggaW4gU21hcnQgZGV2aWNlIEFwcGxu?=, Sep 7, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,800
    =?Utf-8?B?Rmxhc2ggaW4gU21hcnQgZGV2aWNlIEFwcGxu?=
    Sep 8, 2004
  4. Sphenxes
    Replies:
    2
    Views:
    3,084
    Sphenxes
    Sep 25, 2003
  5. ***C.Steamer***
    Replies:
    4
    Views:
    309
    Sudsy
    Sep 29, 2004
Loading...

Share This Page