RE: [PHP-GENERAL] Form Trouble with Multiple Selections

From: Date: Wed, 14 Jun 2000 21:14:51 +0000
Subject: RE: [PHP-GENERAL] Form Trouble with Multiple Selections
Groups: php.general 
Request: Send a blank email to php-general+get-1865@lists.php.net to get a copy of this message
in the select tag don't forget to put the [] if you are using multiple select. e.g. <SELECT NAME="MyField[]"> <OPTION VALUE="1">1 <OPTION VALUE="2">2 <OPTION VALUE="3">3 </SELECT> you will than have an Array $MyField after you submit the form with all of the submitted values. $MyField[0] will have the first value and count($MyField) will let you know how many items were selected. berber http://www.weberdev.com -----Original Message----- From: Phillip S. Baker [mailto:phillip@wordsandimages.com] Sent: Wednesday, June 14, 2000 9:59 PM To: php-general@lists.php.net Subject: [PHP-GENERAL] Form Trouble with Multiple Selections I am having trouble inputting data into MySQL via a form. I have a drop down list that a user can select multiple options from. When the data is entered into one field in MySQl however only one of the options selected is entered into the data field. How do I correct this? -- Phillip S. Baker phillip@wordsandimages.com Words & Images, Inc. 1535 Seabright Avenue, Suite 100, Santa Cruz, CA 95062 Direct Line (831) 420-2641 / Fax (831) 458-0808 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#1865) next »