Re: How to handle a submitted form with no changes -- best practices sought

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

 



On Sat, Sep 11, 2010 at 10:22 PM, Tamara Temple <tamouse.lists@xxxxxxxxx> wrote:
> I 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 been

without 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)


~viraj


> 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?)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
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