View Single Post
Old 08-19-2009, 10:02 AM   #2 (permalink)
sketchMedia
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

change the name of the select to Vote101[], this will make PHP process it as an array.

also
PHP Code:
foreach (array_keys($_POST) as $key) {
$
$key $_POST[$key];
print 
"$key is ${$key}<br />";

can be done like so:
PHP Code:
foreach($_POST as $key => $val)
{
     echo 
$key .' is: ' $val  '<br />';

But now you will have arrays in each of the opts so:
PHP Code:
    echo 'Vote101 is: <br />';
    foreach(
$_POST['Vote101'] as $opt)
    {
        echo 
$opt '<br />';
    } 
should do it.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
The Following User Says Thank You to sketchMedia For This Useful Post:
niconiko (08-19-2009)