I have a potentially large number of checkboxes that I need to get input from. I have a table in a SQL database that has a list of names that I need to pull out, give 4 checkbox inputs for each of them, then put all the new data into a new database.
Currently I have:
This builds the table in the way I want but when I later go back and get the information from this table I run into a problem.
"Request.Form(" input1")" only retrieves the value "on" from the boxes that are checked and nothing from those that are not checked.
How can I get a "false" or "off" value from the ones that are not checked so I can put the collected data into the new table in a [name, val1, val2, val3, val4] kind of format.
Currently I have:
Code:
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "--connection information here--"
SQL = "Select firstname,lastname from [names] order by lastname"
Set RS = Conn.Execute(SQL)
%>
<table border=1>
<tr>
<th>Name</th>
<th>Condition One</th>
<th>Condition Two</th>
<th>Condition Three</th>
<th>Condition Four</th>
</tr>
<%
Do While Not RS.EOF
%>
<tr>
<td><%=RS("LastName")%>, <%=RS("FirstName")%></td>
<td><input type="checkbox" name="input1"></td>
<td><input type="checkbox" name="input2"></td>
<td><input type="checkbox" name="input3"></td>
<td><input type="checkbox" name="input4"></td>
</tr>
<%
RS.MoveNext
Loop
%>
</table>
"Request.Form(" input1")" only retrieves the value "on" from the boxes that are checked and nothing from those that are not checked.
How can I get a "false" or "off" value from the ones that are not checked so I can put the collected data into the new table in a [name, val1, val2, val3, val4] kind of format.