Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: arrays help!
12-10-2004, 05:51 PM #1
- Join Date
- Apr 2004
- Toronto, Ontario
- Thanked 122 Times in 122 Posts
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 #2
- Join Date
- Aug 2002
- Thanked 0 Times in 0 Posts
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>" next %> <html> <body> <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"> </form> </body> </html>