Re: SELECT box
| From: | jeremy brand | Date: | Mon, 11 Dec 2000 23:30:15 +0000 |
| Subject: | Re: SELECT box | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-29767@lists.php.net to get a copy of this message | ||
Feel free to look at libHtmlForm.
http://www.nirvani.net/software/
It includes support for dynamic select boxes.
:)
-jeremy brand
Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html
for more
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
At least for the people who send me mail about a new language that
they're designing, the general advice is: do it to learn about
how to write a compiler. --Dennis Ritchie
On Mon, 11 Dec 2000, Ignacio Vazquez-Abrams wrote:
> Date: Mon, 11 Dec 2000 18:27:20 -0500 (EST)
> From: Ignacio Vazquez-Abrams <ignacio@openservices.net>
> To: Robert Ludvik <robert.ludvik@zd-lj.si>
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] SELECT box
>
> On Tue, 12 Dec 2000, Robert Ludvik wrote:
>
> > hi
> > i create a dinamic select box from DB with this piece of code
> > ...
> > for ($i=0; $i<$num; $i++) {
> > $r = pg_fetch_row($result, $i);
> > $vrstica='';
> > for ($j=0; $j<(count($r)-1); $j++) {
> > $vrstica = $vrstica . $r[$j];
> > }
> > $data1=substr($vrstica,0,3);
> > echo("<OPTION VALUE=$data1>$vrstica");
> > ...
> > with this i try to get some usefull value from selection for further work but
> > from minute to minute it seems more fun to me :)
> > any tip?
> > thnx
> >
>
> You should have a "key" value in the table (ideally an autoincrement field, or
> at least unique) that has the selection value. Then you display the
> description in between <option ...>...</option>.
>
> --
> Ignacio Vazquez-Abrams <ignacio@openservices.net>
>
>
> --
> 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
>
>