well... row is not defined before your loop so this line
echo '<p>Name: '.$row['student'].'</p><br />';
will never work. you might try something like;
$row = mysql_fetch_assoc($result);
echo '<p>Name: '.$row['student'].'</p><br />';
echo $row['course'].'<br />';
echo $row['student'].'<br /><br />';
while ($row = mysql_fetch_assoc($result))
{
echo $row['course'].'<br />';
echo $row['student'].'<br /><br />';
}