alucard786, you can run getComparison.php by it's self and see if it works, but you have to change line 5 from "$id = $_GET['subject'];" to "$id = 'course';" and then to 'school'. I can see where course yields a single <table>, but not with school which queries two DBs. Your calling file only has
<table border="1" id="comparetable"> </table>
Like I said before, I would make the <table> in getComparison.php and echo that to be put in a div. But that's me.