I used the following codes to find the maximum value of marks
<?php
$sql = mysql_query("SELECT MAX(marks) FROM participant ");
$fetch = mysql_fetch_row($sql);
$max_m = $data[0];
$sql = mysql_query("SELECT st_name FROM participant WHERE marks='$max_m'");
$fetch = mysql_fetch_row($sql);
$st = $data[0];
echo $st;
?>
but when I insert a mark that is 2-9 to test, the output become the student with that marks.
How to solve the problem? It works when i use 1 and the number between 10 and 20.(the full mark is 20)