Here is the code:
$form = "<form action=\"test.php\" method=\"post\">
<form name=\"Create\" method=\"post\" action=\"addStudent.php\">
<input type=\"hidden\" name=\"seenform\" value=\"y\">
<p>Enter Student's Last Name:<input type=\"text\" name=\"slname\" maxlength=\"30\" size=\"30\" value=\"$studentLastName\"></p>
<p>Assign Student to a Group:
select name=\"groupID\">
(this next line causes the error)
$listGroups_query = mysql_query("SELECT mathgroup.groupID, mathgroup.groupName from mathgroup");
while($listGroups_record = mysql_fetch_array($listGroups_query)) {
<option value=\"$groupID"\"> $groupName </option>
}
</select><br>
<input type=\"submit\" value=\"subscribe!\">
</form>";
// has the form already been filled in?
if ($seenform != "y"):
print "$form";

