This is how I did mine...
$your_select="<select name=\"which\">\n";
$your_select.="<option value=\"\"> [-- -Select a user- --] </option>";
while($row=mysql_fetch_assoc($result)) {
$your_select.="<option value=\"{$row['user_name']}\">{$row['user_name']}</option>";
}
$your_select.="</select>";
Then when building the page I display the drop down
$your_select <input type="submit" name="submit" value="Select" />
To get the value that was selected
if ($_POST['submit'] == 'Select') {
$selected_name = $_POST['which']; //where which is what you named the dropdownbox The value that was selected is now #selected_name }
Hope that helped some