What is the problem with my code?
$sql = "select username,num from login order by num desc";
$result = $conn->query($sql);
$rnk=1;
if ($result->num_rows > 0) {
while($row = mysqli_fetch_array($result)){
echo "<tr><td>";
echo $row["username"];
echo "</td><td>";
echo $row["num"];
echo "</td><td>";
echo $rnk;
echo "</td></tr>"
}
} else {
echo "0 results found";
}
$conn->close();
I had placed the above code after providing necessary connection codes between table element in my html page with .php extension. When i call the page it shows only a blank page. Its not even showing the table headers.
echo "</td></tr>";on that line.