RE: [PHP] drop down box

From: Date: Wed, 20 Mar 2002 18:05:35 +0000
Subject: RE: [PHP] drop down box
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-89365@lists.php.net to get a copy of this message
This is actually a small excerpt from a program I've written in the past... hope it helps... function show_downtime_form() { global $conf_file; global $filter; $data=file($conf_file); foreach ( $data as $line ) { $bang=explode(':', $line); $idents[]=$bang[0]; } $idents=array_unique($idents); echo '<div align="center"><hr width="300">'; echo '<form name="inputform" action="reports.php" method="post">'; echo 'Match Idents To:<br>'; echo '<input type="text" name="filter" value="'.$filter.'">'; echo '<br> - OR Select - <br>'; echo '<select name="temp" onchange="doEcho()">'; echo '<option selected>--From Current Idents--'; foreach($idents as $ident) { echo '<option value="'.$ident.'">'.$ident; } echo '</select>'; echo '<br>'; echo '<input type="submit" value="search">'; echo '</form>'; echo '</div>'; } -----Original Message----- From: ...::: M.E. Suliman :::... [mailto:essa@netactive.co.za] Sent: Wednesday, March 20, 2002 9:57 AM To: php-general@lists.php.net Subject: [PHP] drop down box Hi I need to get info from a specific field in a MySQL database to appear in a drop box as options. Has anyone any ideas on this. Thanks Mohamed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#89365) next »