Problems with check box and array
I am building a simple message system for my intranet. I have a webpage where I see the name and subject of all messages received. Every name has a check box beside. What I want to do is that when I select some records using its check box, I want to send the values to a second page which will delete only the selected records. With the code I have right now, I can't only delete all records if I click all check boxes otherwise I receive an error message: " Subscript out of range: "
This is the code I am using:
I will appreciate any help about this matter.
set Command1 = Server.CreateObject("ADODB.Connection")
Command1.ConnectionString = MM_rentas_STRING
for iLoop=0 to Ubound(strID)
If strLD(iLoop) = True then 'check to see if the check box is selected
strSQL = "delete * from messages WHERE mes_Id = " & strID(iLoop)
Set Command1 = Nothing