Hallo there;
I don't know wether I have understood your point or not:
The Students select Subject and Chapter from option box: Drop Down menu.
if you generate the Subject and the Chapter from the database dynamically,
<form action = file.php method=post>";
<select name = SubjectID>";
$query = "select * from subject where ...";
$result = mysql_query($query);
while($record = mysql_fetch_object($result)){
if($record->SubjectID == $SubjectID){$sel = "Selected";}
if($record->SubjectID != $SubjectID){$sel = "";}
echo "<option value= '$record->SubjectID' $sel>$record->SubjectName</option>";
}
echo "</select>";
......
This keeps the selected subject as a header,