On 09/11/2010 11:52 AM, Tamara Temple wrote: > I have a general question and am looking for best practices. > > Suppose I present a user with a form for editing an entry in a table, > i.e., the form has filled in values from the existing table entry. > > Now, suppose they click on 'submit' without making any changes in the > form. (Perhaps, say, rather than clicking 'Cancel' or 'Return to Main' > or some other option which would get them out of that screen without > submitting the form). > > Is it worth the overhead of passing along the previous values in the > table in hidden fields so that fields can be checked to see if they've > been updated or not after the submit? Or is it worth reloading the old > values from the table to check against the newly submitted form? Or is > all that overhead not worth the time because an update that overwrites > existing values with the same values is not that onerous? > > (Is that question clear enough?) I would just submit the query. Unless you have hundreds or thousands of users per second that load the form and submit the form with no changes, then there really is no problem. It could however be a problem if there is a BOT or something that continually submits to your page. In that case (and in general) I would recommend using a form token that helps guard against this. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php