this is just a simple code.My problem here is that I can't get or display subject loads of a teacher.
$sql = mysql_query("SELECT * FROM teachersubject WHERE teacherID ='$id'");
while($test = mysql_fetch_array($sql))
{
$subjectid=$test['subjectID'];
$getsubject=mysql_query("SELECT * FROM subject WHERE subjectID='$subjectid'") or die(mysql_error());
$getthis=mysql_fetch_array($getsubject);
echo "<option value=".$getthis['subjectID'].">".$test['subjectCode']."</option>";
}
mysql_close($conn);
?>
This in a form of List/Menu..thanks
Please I really need help... :(