Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Checkboxes and Multiple Selection - An Issue
Old 06-25-2010, 10:15 PM Checkboxes and Multiple Selection - An Issue
Novice Talker

Posts: 13
Trades: 0
Hi,
i have a form on my website, and on one section i have a list of checkboxes. Visiters can choose one or multiple selections, however when i get the email, i only get the last selection:

ie: checkbox 1= 1, checkbox 2=2, checkbox 3=3. When i select all three, i get in the email only checkbox 3.

<td>
<input type="checkbox" name="size" value="0" /> studio/bachelor
<input type="checkbox" name="size" value="1" /> 1
<input type="checkbox" name="size" value="2" /> 2
<input type="checkbox" name="size" value="3" /> 3
</td>

Any idea?
vio1 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-26-2010, 11:08 AM Re: Checkboxes and Multiple Selection - An Issue
Banned

Posts: 24
Name: sdasdas adad
Trades: 0
i think the problem is with the code. are you using php?
ziawap is offline
Reply With Quote
View Public Profile
 
Old 06-26-2010, 12:11 PM Re: Checkboxes and Multiple Selection - An Issue
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
The problem is that each checkboxes have the same name.
Give them different names, and if your code handle it, you will see each values of each checkboxes.

But if you submit a form with 2 elements that have the same name, only the last one will be seen.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 06-26-2010, 10:24 PM Re: Checkboxes and Multiple Selection - An Issue
Novice Talker

Posts: 13
Trades: 0
i am using php.
arent you supposed to use the same name for a list of checkboxes? everywhere i search checkboxes, its written like that.
vio1 is offline
Reply With Quote
View Public Profile
 
Old 06-27-2010, 03:45 AM Re: Checkboxes and Multiple Selection - An Issue
vultren's Avatar
Webmaster Talker

Posts: 583
Name: Tony
Location: Seattle Washington
Trades: 1
You named them all "size".
__________________

Please login or register to view this content. Registration is FREE

I am here to give advice as well as learn.

Please login or register to view this content. Registration is FREE
.
vultren is offline
Reply With Quote
View Public Profile
 
Old 06-27-2010, 05:13 AM Re: Checkboxes and Multiple Selection - An Issue
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
How do you process the form data?

Form elements with the same name will be sent to the server as a comma separated sting of values, if your handling routines do not allow for that you will get odd results.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Checkboxes and Multiple Selection - An Issue
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26148 seconds with 12 queries