on line 16, $query is NOT an sql command (You already have a result set in $query from the executed sql command on line 5), so it is essentially erroring out before it can emit those other options (look at the browser source code).
On what you posted, I don't see the point of lines 6-8 since:
a. You keep overwriting the value of $subjectid on every iteration of your loop
b. You are not using it anywhere else
c. Youintended to execute the same query again to generate the options. Why not just use what's in $query
hielo
Veteran Poster
1,124 posts since Dec 2007
Reputation Points: 116
Solved Threads: 244