Ok, if I understand well, this should be what you are looking for...
<?
/ ------------------------------------------------------ /
/ connect to the DB ------------------------------------ /
/ ------------------------------------------------------ /
$db = mysql_connect("$host", "$login", "$password");
mysql_select_db("$base",$db);
/ ------------------------------------------------------- /
$sql = "select gprno, name from $table";
$req= mysql_query($sql) or die('Erreur SQL !'.$sql.'<br>'.mysql_error());
echo '<select name="grpno">';
while($data = mysql_fetch_array($req))
{
echo '<option value='.$data['grpno'].'>'.$data['name'].'</option>';
}
echo '</select>';
mysql_close();
?>
Hope this helps... ;o)
Nicolas