Dim arr
if values("fieldname")<>"" then
arr = Split(values("fieldname"),",")
' This is the name of the multi check box or
' list select field, its value becomes $arr
for i=0 to arr.Count
strInsert = "insert into TableName (field) values ('" & arr(i) & "')"
' add more fields from the add page to be inserted into database
dbConnection.Execute strInsert
next
Response.Redirect "MyPage_list.asp"
' Exit and Redirect to the list page after updating database
exit function
end if
|