Claralu
08-04-03, 12:44 AM
I`m trying to generate a form with rows from a database and a checkbox, so that when the user checks a checkbox the program executes a SQL statement with all the rows that are checked.
I`m trying the following code to generate the checkboxes.
<% dim i
i=1
while not tabla.EOF %>
<%dim tot1,totval
totval=int(tabla.RecordCount)
tot1=0
%>
<tr>
<td> <% =tabla.Fields("codigo")%> </td>
<td> <% =tabla.Fields("titulo")%> </td>
<td><input type="checkbox" name="cb"&<%= i %> value=tabla.Fields("codigo")>
</td>
</tr>
<% i=i+1
tabla.MoveNext
wend
%>
Then on the asp page that receives the form submit, I`m trying to access the value of the rows with cb&i name to perform the SQL statement with those rows, but I don`t get any results.
I`m new to ASP, please help.:(
I`m trying the following code to generate the checkboxes.
<% dim i
i=1
while not tabla.EOF %>
<%dim tot1,totval
totval=int(tabla.RecordCount)
tot1=0
%>
<tr>
<td> <% =tabla.Fields("codigo")%> </td>
<td> <% =tabla.Fields("titulo")%> </td>
<td><input type="checkbox" name="cb"&<%= i %> value=tabla.Fields("codigo")>
</td>
</tr>
<% i=i+1
tabla.MoveNext
wend
%>
Then on the asp page that receives the form submit, I`m trying to access the value of the rows with cb&i name to perform the SQL statement with those rows, but I don`t get any results.
I`m new to ASP, please help.:(