ok.. first at all.. you should name the select statement
i.e.
<select name="groups">
//here goes your script with the options
</select>
and the options should have a value
i.e. <option value="1">1 </option>
so in your code it would something like
while(list($bgroup) = mysql_fetch_row($result)) {
print "<option value='$bgroup'>$bgroup</option>\n";
note the value= '$bgroup'
this value is the one you'll get on your next page, in your next page you should just print out $groups, "echo $groups", remember it's the options' name.
i hope this helps