Re: Re: getting values from multiple select
| From: | Erik Price | Date: | Thu, 14 Mar 2002 14:23:41 +0000 |
| Subject: | Re: Re: getting values from multiple select | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88498@lists.php.net to get a copy of this message | ||
On Wednesday, March 13, 2002, at 10:27 PM, David Robley wrote:
If you are using a SELECT MULTIPLE you need to name the item as an array, e.g. NAME="multi[]" - then loop through the array in the target script to extract the values. Don't forget to either define a default selection or check for 'none selected'Such as if ($_POST['multi']) { // loop thru the array and extract the values } else { // there were none selected so don't loop thru // the array (or you'll raise an error) } ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com