I am trying to keep two menu lists' option in variables but i dont know whether to use "selected" or "select name" to assign value
1st one which brings "Student Numbers" rows from its column in selected class table.
$query="SELECT StudentNumber,Student_id FROM $CC";
$result = mysql_query ($query);
echo "<select name=\"STUDENT\" value=''>Student Number</option>";
while($nt=mysql_fetch_array($result)){
echo "<option value=$nt[Student_id]>$nt[StudentNumber]</option>";
}
echo "</select>";
and second brings field names (Quizzez and midterms etc..) from that selected class table (btw it piece gives two errors
1-Warning: mysql_list_fields() [function.mysql-list-fields]: Unable to save MySQL query result in
2- Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource
$fields = mysql_list_fields("Courses", "$CC", $link_id2);
$columns = mysql_num_fields($fields);
echo "<select name=\"EXAM\">";
for ($i = 4; $i < $columns; $i++) {
echo "<option value=$i>";
echo mysql_field_name($fields, $i);
}
echo "</select>";
what should i do in order to assign first one's value to $StudentNumber and second one's $EXAM