Soldato
- Joined
- 24 Nov 2002
- Posts
- 16,378
- Location
- 38.744281°N 104.846806°W
I was using phpmyadmin earlier and had an idle thought.
How does it know what I'm updating?
Say I have a simple table:
id | value
1 | a
2 | b
3 | c
If I have an edit form that displays the first record only (to edit):
id: 1
val: a
And I change (on the form) a to f and submit, presmuably update val where id = 1 and val = a to val = f, would be called. However, how can you let it know the original value of the field... hidden fields?
If id(form).value != id(hidden).value, update id(hidden) field with id(form).value?
Did that make any sense?
How does it know what I'm updating?
Say I have a simple table:
id | value
1 | a
2 | b
3 | c
If I have an edit form that displays the first record only (to edit):
id: 1
val: a
And I change (on the form) a to f and submit, presmuably update val where id = 1 and val = a to val = f, would be called. However, how can you let it know the original value of the field... hidden fields?
If id(form).value != id(hidden).value, update id(hidden) field with id(form).value?
Did that make any sense?
