IPB
Your Ad Here


Welcome Guest ( Log In | Register )

Using checkboxes with an edit form & database
Misha Singh
post Nov 6 2009, 07:58 PM
Post #1


Advanced Member
***

Group: Members
Posts: 7,880
Joined: 23-November 08
Member No.: 6,521



I have a database field that I want to store various products sizes

So I have a form to edit this record with the 1 size field called 'size'

checkbox input choice seems right:

<input name="size1" type="checkbox" value="small" checked />
<input name="size2" type="checkbox" value="medium" checked />
<input name="sizes3" type="checkbox" value="large" checked />

- when I save - I can concatente them together - sep with comma like

size = size1. ',' . size2 . ',' . size3


- but when I re-edit the field I'll have to UNDO that and pull each out and put back into

<input name="size1" and <input name="size2" and 3 etc...

Is there an easier way to deal with storing multiple choices that will be stored in 1 field?
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
Tags
No Tag inserted yet

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st November 2009 - 09:32 AM
Your Ad Here