TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 01-10-2009, 03:15 PM   #1 (permalink)
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
sarmenhb is on a distinguished road
Default 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)
__________________
no signature set
sarmenhb is offline  
Reply With Quote
Old 01-10-2009, 05:09 PM   #2 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

That link doesn't resolve for me.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 01-10-2009, 05:23 PM   #3 (permalink)
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
sarmenhb is on a distinguished road
Default

try going to http://www.iaddesignandstudio.com/offline then click on the tab quote
__________________
no signature set
sarmenhb is offline  
Reply With Quote
Old 01-10-2009, 07:32 PM   #4 (permalink)
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
sarmenhb is on a distinguished road
Default

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.
__________________
no signature set
sarmenhb is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP & MySQL Inserting multiple entires from range. Acrylic Absolute Beginners 3 10-02-2008 02:27 AM
A serious curl checkbox problem bedri Advanced PHP Programming 1 05-22-2008 04:25 PM
Passing multiple arguments to a function via one variable. delayedinsanity Advanced PHP Programming 10 05-07-2008 05:04 AM
Multiple Checkbox problems riscphree General 15 01-17-2008 06:18 PM
how to make the value of checkbox 1 or 0 meshi General 2 10-16-2007 07:25 AM


All times are GMT. The time now is 04:34 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design