$view_users_query="select * from messagetest where status='unread'";//select query for viewing users.
$run=mysqli_query($dbcon,$view_users_query);//here run the sql query.
while($row=mysqli_fetch_array($run))//while look to fetch the result and store in a array $row.
{
$id=$row[0];
$invoice_no=$row[1];
$date=$row[2];
$product_name=$row[3];
$module_number=$row[4];
$status=$row[5];
?>