Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Viciouse Circle !

Reply
Thread Tools

Viciouse Circle !

 
 
Mel Smith
Guest
Posts: n/a
 
      08-03-2010
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


 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      08-04-2010
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
 
Reply With Quote
 
 
 
 
Mel Smith
Guest
Posts: n/a
 
      08-04-2010
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



 
Reply With Quote
 
Mel Smith
Guest
Posts: n/a
 
      08-04-2010
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


 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      08-04-2010
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
 
Reply With Quote
 
Mel Smith
Guest
Posts: n/a
 
      08-04-2010
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


 
Reply With Quote
 
Raymond Schmit
Guest
Posts: n/a
 
      08-04-2010
On Wed, 4 Aug 2010 14:16:44 -0600, "Mel Smith"
<(E-Mail Removed)> 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.
 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      08-05-2010

"Mel Smith" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.


 
Reply With Quote
 
Mel Smith
Guest
Posts: n/a
 
      08-05-2010
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


 
Reply With Quote
 
William Gill
Guest
Posts: n/a
 
      08-07-2010
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?).


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WinXP + 350 Cisco card vicious circle... =?Utf-8?B?aG9tZXBpeGVscw==?= Wireless Networking 1 05-02-2005 10:23 PM
Create circle in webform =?Utf-8?B?Rmxhc2ggaW4gU21hcnQgZGV2aWNlIEFwcGxu?= ASP .Net 3 09-08-2004 09:37 AM
Jisatsu circle (Suicide Circle) Col's Cavern DVD Video 1 06-07-2004 06:55 PM
moving label in c# around circle =?Utf-8?B?dGFnaHJlZWQ=?= ASP .Net 1 05-03-2004 04:27 PM
Circle Hell Talon Perl 2 09-04-2003 07:25 PM



Advertisments