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:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 9:57 AM To: [EMAIL PROTECTED] 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php