i don't know how to see the values i select in a list form |
i don't know how to see the values i select in a list form |
mobutu_LM2006 |
Sep 29 2006, 06:38 AM
Post
#1
|
Group: Members Posts: 1 Joined: 29-September 06 Member No.: 271 |
I want to see the values wich i select in a list form.
The code is : " <select name="categoria_insert" size="3" id="categoria_insert"> <option>A</option> <option>B</option> <option>C</option> <option>D</option> <option>E</option> </select> " If i select options 'A' and 'D', for example, the value posted in $_POST['categoria_insert'] when i push the submit button is only 'D', not 'A' and 'D'. Help me please. Thank you. |
Frederiek |
Sep 29 2006, 07:29 AM
Post
#2
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
Then I don't think you need a select menu but checkboxes.
See http://htmlhelp.com/reference/html40/forms/input.html |
Sparkyg |
Sep 29 2006, 07:51 AM
Post
#3
|
Member Group: Members Posts: 46 Joined: 29-September 06 From: Suffolk UK Member No.: 270 |
Hi there
the values will be in an array, try the code below for($i=0;$i<sizeof($_POST['categoria_insert']);$i++) { echo $_POST['categoria_insert'][$i]; } cheers Sparky |
Sparkyg |
Sep 29 2006, 09:13 AM
Post
#4
|
Member Group: Members Posts: 46 Joined: 29-September 06 From: Suffolk UK Member No.: 270 |
And the select statement should be as below
<select Name="categoria_insert[]" multiple> best wishes Sparkry |
Christian J |
Sep 29 2006, 11:19 AM
Post
#5
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
Also, with a MULTIPLE SELECT menu the Windows* user must hold Crtl down while selecting separate items (say item #1 and #3 but not #2). Most likely many users don't know about this functionality (and must be told on the web page).
*Don't know how it's done on a Mac. |
jimlongo |
Sep 29 2006, 11:38 AM
Post
#6
|
This is My Life Group: Members Posts: 1,128 Joined: 24-August 06 From: t-dot Member No.: 16 |
|
Lo-Fi Version | Time is now: 25th April 2024 - 11:14 AM |