$result = mysql_query("SELECT MAX(page) AS HighestPrice FROM cpta_action_student WHERE id_card = '$myid' AND userid = '$r' AND course_id = '$myCourse' AND no_course_id = '$myNoCourse' AND chapter = '$myChapter'");
20.
$obj = mysql_fetch_object($result);
21.
echo "myLastPage=$obj->HighestPrice";