Array form processing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to process a form where the user uses checkboxes:

<input type="checkbox" name="painDesc[]" value="1" />Sharp
<input type="checkbox" name="painDesc[]" value="2" />Stabbing
<input type="checkbox" name="painDesc[]" value="3" />Jabbing

When I do:

foreach($_REQUEST as $key => $val) {
     $$key = $val;
	 echo $key . ": " . $val . "<br>";
}

The output is:

painDesc: Array

I need to know the values of the array (IE to know what the user is
checking), not that there is an array.  I hope to save these values to the
database.

Thank you.

Ron


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux