...

View Full Version : arrays help!



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

example,
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.

like
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!
-Ken

allison
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>"
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>



allison



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum