View Full Version : arrays help!

12-10-2004, 05:51 PM
I'm trying to split up an array to insert into a data base,

I'm setup several check boxes on html form,
and i need to submit them to the db, and have them split so that
each value uses a new row.

Friday 4:00PM - 8:00PM, Saturday 8:00AM - Noon, Saturday Noon - 4:00PM, Saturday 4:00PM - 8:00PM, Sunday 8:00AM - Noon, Sunday Noon - Finish

i need to be able to insert these values one at a time,
I know i need to use an array to do this, but i can't remember how.

if some one could show me an example that would be great!

thanks in advance for your time!

12-10-2004, 09:56 PM
if they are coming from checkboxes you don't need to split them up at all

Response.Write Request.Form("r") & "<hr>"
for each node in Request.Form("r" )

'Display each checkbox node one at a time
Response.write "<p>" & node & "</p>"
<form method="post">
<input type="checkbox" value="a1" name="r">a1</input>
<input type="checkbox" value="a2" name="r">a2</input>
<input type="checkbox" value="a3" name="r">a3</input>
<input type="submit">