p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Basics (http://p2p.wrox.com/forumdisplay.php?f=61)
-   -   how to store 2 checkbox values in separate lines i (http://p2p.wrox.com/showthread.php?t=58641)

jennypretty June 1st, 2007 01:13 PM

how to store 2 checkbox values in separate lines i

I created a checkbox that allows users to select more than one boxes and use Access db to store values. How do I make 2 lines in Access table field if a user select 2 boxes.

Here is my code:
<input type="checkbox" name="a" id="a" value="Asian" />Asian<BR />
<input type="checkbox" name="a" id="b" value="Latino" />Latino<BR />
<input type="checkbox" name="a" id="c" value="White" />White<BR />

If a user check 2 first boxes, I like to have a value in the field to be:

Instead of Asian, Latino

How do we do that?



mat41 June 3rd, 2007 06:39 PM

If your checkboxes are named the same you will get a commer delimited string posted in the one request.form value. Uniquely name your checkboxes to get independant vales posted, just like any otehr forma element

NOTE: You have uniquely named 'id' properties however IE receives the 'name' property

Wind is your friend

All times are GMT -4. The time now is 07:58 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.