TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   inserting multiple checkbox selections on one row (http://www.talkphp.com/absolute-beginners/3853-inserting-multiple-checkbox-selections-one-row.html)

sarmenhb 01-10-2009 03:15 PM

inserting multiple checkbox selections on one row
 
good day all,

i have this page here
http://www.gothostin.com/iad/offline/quote.php

i was wondering how i put all the selected checkbox items including all other data that is entered onto the form on one row for a customer.

for the items that take one form of data that would be inserted on one row in the table. but when someone selects more than one checkbox how is that inserted on one row? (instead of inserting multiple rows just for the selected checkbox)

Wildhoney 01-10-2009 05:09 PM

That link doesn't resolve for me.

sarmenhb 01-10-2009 05:23 PM

try going to http://www.iaddesignandstudio.com/offline then click on the tab quote

sarmenhb 01-10-2009 07:32 PM

basically what im trying to do is

lets say have on a form these checkboxes
the name i've specified is the name of the checkbox that i've set for now (maybe in this case people normaly just call them option[] instead of the way i've done it (i dontk now :) ) and the default value for the checkbox i've specified.
Code:


[  ]  checkbox 1 [name=opt1], default value = "option1"
[  ]  checkbox 2[name=opt2], default value = "option2"
[  ]  checkbox 3[name=opt3], default value = "option3"
[  ]  checkbox 4[name=opt4], default value = "option4"
[  ]  checkbox 5[name=opt5], default value = "option5"

if a user selects more than one checkbox how do create a table for this and insert its values on one row?

and lets say there are more fields asking for the persons name , address etc... and this person selected more than one checkbox how would i insert the values selected all on one row or some form so that it can relate to that one persons selection??

what one person told me was to insert the values selected all seperated by a comma into a column then use the explode to seperate them when taking them out.

let me know what i can do, when it comes to things like this i get stuck. i want to do it the right way not the half ass way as i have been doign it for a long time.


All times are GMT. The time now is 03:22 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0