Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need array from multiple checkboxes with same name using ReadParse

Status
Not open for further replies.

fixumdude

Programmer
Aug 19, 2001
6
US
I have an HTML form with multiple checkboxes using the same name...DRIVER as follows

<input type=&quot;checkbox&quot; name=&quot;DRIVER&quot; value=&quot;4&quot;></td>
<input type=&quot;checkbox&quot; name=&quot;DRIVER&quot; value=&quot;5&quot;></td>
<input type=&quot;checkbox&quot; name=&quot;DRIVER&quot; value=&quot;6&quot;></td>

If all of the boxes are checked I would like to get an array as follows

@drivers = &quot;4, 5, 6&quot;

I use ReadParse to process the form data and all of the checked items come in combined as one line in the variable

$in{'DRIVER'}

so if I say

@drivers = $in{'DRIVER'};

@drivers shows that it only has 1 element no matter how many items are selected on the HTML form and they are all compbined in that one item...for example if all of the items above were checked and then I hit SUBMIT, $in{'DRIVER'} would contain the following element:

456

all run together instead of three different elements 4, 5 & 6... can I get an actual array of different elements from multiple checkboxes of the same name by using ReadParse?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top