Re: Can a script run twice?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 01:50 PM 5/23/2006, Lester Caine wrote:
2) the script that processes input, which redirects to:

Yep that is the one, and it does check if the user already has an existing ticket, but it does not see the ticket created by the first click of double click in Moz :(
*THAT* should prevent the second record !

3) the page that displays the results (or is the next form in a sequence).

This just sees the second record and not the first :(

Even if the user reloads the results page (3) they won't be resubmitting the form (1) or repeating the input processing (2).

Exactly what should be happening. The bit I have to work out is why the second page is not seeing the already loaded ticket! Which I think is exactly where I started, the scripts seem to be processed in parallel and so do not see the data committed by each the other instance.


I really don't see how this could be browser-dependent. (Unless you have cookies or session cookies disabled in your Mozilla browser?)

I can see that, in theory, it might be possible to submit a form twice in succession so quickly that the first query is still being processed by PHP when the second query is initiated. It's hard to imagine such a slow database or script, but perhaps all it would take would be a slow internet connection.

However, if you flag form submission in the session cookie I don't think it's practically possible to slip a duplicate by. Because both form submissions would exist in the same session context, the server would know that a tenth or hundredth of a second previously the same session had submitted the same form, and could squelch it.

Paul
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux