Re: Handling Multi-Select form lists

From: Date: Wed, 17 Jul 2002 07:10:48 +0000
Subject: Re: Handling Multi-Select form lists
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-14805@lists.php.net to get a copy of this message
ron .... > I am using a multi-select form list...how do I go > about retrieving the > multiple values? My current script only pulls the > first value using: > > $_POST['multi_select']; echo("<select id=cat_opt name=cat_opt_name> <optgroup label=category> "); # use mysql_fetch_row to retrieve the results for ($count = 1; $row_id = mysql_fetch_row ($query_result_handle), $row_nme = mysql_fetch_row ($query_result_handle_nme); ++$count) { $tID = $row_id[0]; $tName = $row_nme[0]; echo (" <option value=$tID > $tName "); // echo ("<br><br>"); //echo( "'$row[0]'" ); // let this in for "" // echo ("<br><br>"); //echo( " $row[1]" ); // echo ("<br><br>"); //echo (" '$row[2]'" ); // leave dis in fo row numbers or cat idz ... :S ... i aint sure which 1 :| .... } echo("</optgroup> </select> "); this is how you retrieve some values from ur db into ur multi-select list hope this helps u .... good luck toby ..... __________________________________________________ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com

« previous php.windows (#14805) next »