I have the following table in page1.asp

<table>
<tr>
<td><input type="checkbox" name=chk value=1></td>
</tr>

<tr>
<td><input type="checkbox" name=chk value=2></td>
</tr>


<tr>
<td><input type="checkbox" name=chk value=3></td>
</tr>

</table>

If I want to retrieve the value of all the checkboxes which I have selected in page1.asp and display them in another page, page2.asp then I write the code as below

for each cid in request.Form("chk")
response.Write cid 
next

Now if I select 2 checkboxes (2 and 3) then the result will show like 23


but I want them in seperate variables, how can I?


Thanx for your help

Member Avatar for GreenDay2001

make

for each cid in request.Form("chk")
response.Write cid 
next

to

for each cid in request.Form("chk")
response.Write " " & cid 
next
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.