Give your checkboxes the same name.
<input type="checkbox" name="mycheckbox" value="1">
<input type="checkbox" name="mycheckbox" value="2">
.
.
.
n
Then when the form is posted you have an array which you can iterate or pass to a stored procedure or whatever your prefered method is.
sql="update table set column=value where id in ("
for i = 0 to Request.Form("mycheckbox").length - 1
if i=0 then
sql=sql & Request.Form("mycheckbox").item(i)
else
sql=sql & "," & Request.Form("mycheckbox").item(i)
end if
next
sql = sql & ")"
con.execute(sql)
Reputation Points: 262
Solved Threads: 68
Veteran Poster
Offline 1,181 posts
since Feb 2005