Its difficult to find out what's wrong from the code itself. It comes down to debugging and finding the cause of the problem yourself. Did you check out the result from the
echo $sql;
as I told you before? What output did it give?Did it print something like:
SELECT take.StudentID,student.StudentName,take.CourseID,course.CourseName FROM take,student,course WHERE take.StudentID = student.StudentID AND take.CourseID = course.CourseID AND take.StudentID LIKE '%' ORDER BY take.StudentID ASC;
Is your $_POST[sid] getting the value you want it to pull?
Did you encapsulate the variables like I told you to?
Are you getting an error or just not getting any data?
Is StudentID a unique ID. If so why do you need to use LIKE?mysql_fetch_array() is giving you an error because $result is not a resource. $result is not a resource because you sql query is incorrect.
YES now it works, i had to take the "line 33" off.i previously put it for error finding. :)