checkbox array help, passing values for multiple checkboxes |
![]() ![]() |
checkbox array help, passing values for multiple checkboxes |
Nov 9 2008, 11:34 PM
Post
#1
|
|
|
Member ![]() ![]() Posts: 35 OS: Windows XP |
CODE <input name="checkbox[]" type="checkbox" value="value1" /> <input name="checkbox[]" type="checkbox" value="value2" /> <input name="checkbox[]" type="checkbox" value="value3" /> <input name="checkbox[]" type="checkbox" value="value4" /> <input name="checkbox[]" type="checkbox" value="value5" /> <input name="checkbox[]" type="checkbox" value="value6" /> now in the php script I want to use each value but for example's sake lets just echo the selected values CODE <?php $box = is_array($_POST['checkbox']); echo $box; ?> except all I get is the word "Array" to echo. What am I doing wrong? |
|
|
Nov 12 2008, 05:20 AM
Post
#2
|
|
|
Spyware Veteran Posts: 20,960 From: Netherlands OS: XP Pro & Vista Ultimate |
is_array($_POST)
That only checks if it exists if I'm not mistaking. Maybe this will help you: http://phpprogramming.wordpress.com/2007/0...n-form-element/ |
|
|
![]() ![]() |
Similar Topics
| Topic Title | Replies / Views | Topic Information | |||||
|---|---|---|---|---|---|---|---|
![]() |
6 / 609 | 24th January 2007 - 03:22 PM Joeturf started - last by Ctrl_Alt_Del |
|||||
![]() |
2 / 243 | 9th July 2007 - 07:46 PM Lungfixer started - last by cmw2010 |
|||||
![]() |
3 / 515 | 12th May 2008 - 05:11 PM digikiwi started - last by Neil Jones |
|||||
![]() |
0 / 302 | 12th June 2008 - 07:31 AM rps2 started - last by rps2 |
|||||
|
Time is now: 8th January 2009 - 01:25 AM |
| Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk. |