I've the following PHP code. I wanted to display the output (in my case, it's the student's marks) in proper table that should be readable.
<?php
include_once("config.php");
$enrollmentno = $_POST['enrollmentno'];
$enrollmentno = mysql_real_escape_string($enrollmentno); // For MySQL injection
$result = mysql_query("SELECT * FROM exam WHERE enrollmentno='$enrollmentno'");
if ($row = mysql_fetch_array($exam)) {
echo $row['enrollmentno'];
echo $row['studentname'];
echo $row['schoolname'];
echo $row['class'];
echo $row['physics'];
echo $row['chemistry'];
echo $row['zeology'];
echo $row['botany'];
echo $row['marksscored'];
echo $row['totalmarks'];
echo $row['percentagescored'];
} else {
echo "Invalid Enrollment Number";
}
?>