Forum Moderators: open
UID Name Status
242 Bob Open
265 Charles Closed
266 Jane Cancelled
Now what I want to do is be able to change all the statuses, have a submit button at the bottom and when that is clicked update the records in the database with the new status code. However I don't know how to differenterate between them.
Anyone got any ideas?
In a situation like this, I always add a number to each row when writing the page (so the form fields are UID_1, Name_1, Status_1, then UID_2 etc). Also add a form field called something like "MaxID" which contains the highest number you got to.
Then you can do something like this
for i = 1 to request("MaxID")
sqlstr = sqlstr & "UPDATE tble SET STATUS='"&request("Status_"&i)&"' WHERE UID ="&request("UID_"&i)&";"
next