Fw: [PHP] Piping data into a select box

From: Date: Sun, 13 Jan 2002 03:12:45 +0000
Subject: Fw: [PHP] Piping data into a select box
Groups: php.general 
Request: Send a blank email to php-general+get-80330@lists.php.net to get a copy of this message
----- Original Message ----- From: hugh danaher <hdanaher@earthlink.net> To: Dean Householder <dean@adoption.com> Sent: Saturday, January 12, 2002 7:12 PM Subject: Re: [PHP] Piping data into a select box > Dean, give this a try. > > <form action="<?php print $php_self?>" method="post"> > <?php > <select type=text name=table STYLE=width:180px> <option> "; > for ($i=0;$i<=$num;$i++) > { > print "<option>".mysql_tablename($tables,$i); // or. i.e. > $some_array[$i] > } > print "</select>"; > > echo "table ".$table; > > hugh > > > ----- Original Message ----- > From: Dean Householder <dean@adoption.com> > To: <php-general@lists.php.net> > Sent: Saturday, January 12, 2002 6:01 PM > Subject: [PHP] Piping data into a select box > > > Does anyone know how to give a select pulldown box a default value from a > PHP variable? > > I've been able to figure out how to pipe data into every type in <input > > type of form element except for a <select > element. Any solutions would be > helpful! > > Dean > >

« previous php.general (#80330) next »