[nycphp-talk] Preferred method for parsing multi-rowsubmitbuttons
Allen Shaw
ashaw at polymerdb.org
Mon Nov 21 17:42:53 EST 2005
Cliff Hirsch wrote:
> That's what I figured. I'll stick with POST. Than I only have to worry
> about impatient users with overly active button pushing tendencies.
>
> And what if it the link was an update, not a delete -- like a status
> change. An old bookmarked link might change a status that has been
> updated subsequently to a different status. It means more state
> information needs to be saved to prevent these issues.
Often what I do here is have the script write a variable with a unique
key into the form/URL, and on submission, store the key and/or see if
it's been used before. If it's been used before, the "update" action
gets skipped, and just the page is displayed. For pages that depend on
the output of the update query then you don't get exactly the same page,
but you can code around that. But this way I don't have to worry about
even something like a page reload doing weird things to my data.
--
Allen Shaw
Polymer (http://polymerdb.org)
More information about the talk
mailing list