Hello
I want to check the number of records in the database and display the number of records on the screen, but it is not working, what could be wrong?
<?php
include '../include/connection.php';
$query = "SELECT id FROM user ORDER BY id ASC";
$result = mysqli_query($link, $query) or die(mysql_error());
$rows = mysqli_num_rows($result);
while ($row = mysqli_fetch_array($result))
{
echo $rows;
}
?>
Thank you