Re: How to handle a submitted form with no changes -- best practices sought
| From: | Tamara Temple | Date: | Sun, 12 Sep 2010 07:40:07 +0000 |
| Subject: | Re: How to handle a submitted form with no changes -- best practices sought | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-307974@lists.php.net to get a copy of this message | ||
On Sep 11, 2010, at 9:27 PM, viraj wrote:
On Sat, Sep 11, 2010 at 10:22 PM, Tamara Temple <tamouse.lists@gmail.comwrote:Ah, interesting idea, I hadn't thought of that as an option. Yes, it makes sense. Also makes sense to store it in a session variable instead of on the form. Thanks, TamaraI have a general question and am looking for best practices. 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 beenwithout storing all the values in respective hidden fields, calculate a 'checksum' on data and store in one hidden field. after the submit and before you decide on the update, you can calculate the checksum of submitted data, compare against the hidden field checksum and take the decision. if you maintain a session, storing checksum in session instead of client side (hidden field in form) will be more safe/secure and will help in improving the mechanism (persistent classes, serialized data etc)