|
Posted by Oli Filth on 09/06/05 02:47
David said the following on 05/09/2005 23:58:
> I have a web app that is forms intensive. These forms have a number
> of dropdown lists, check box, etc., each which requires additional
> processing, db calls, etc. On an item changed, I post back the form
> and set a hidden field to tell PHP what changed so it knows what to
> process.
This relies on Javascript being enabled, and is a waste of bandwidth
(you need to send a load of extra HTML, and the form submission requires
a load of extra fields).
Why do you need to know exactly what was changed? Why not just update
everything when you've received the form submission?
If you're worried about speed, it will make virtually zero speed
difference whether you update one field in a table row, or the whole row.
If you need to identify changes in values to trigger specific actions,
then either extract the original values from the DB and do a comparison
server-side, or store the original values in $_SESSION.
--
Oli
[Back to original message]
|