```
<?PHP
    $con=mysqli_connect("localhost","root","","userinfo");
       // Check connection
       if (mysqli_connect_errno()) {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$result = mysqli_query($con, $query);

while($row = mysqli_fetch_array($result)) {

if ($result) {
    $Chromerows = mysqli_num_rows(mysqli_query($connection,"SELECT * FROM tbl_stats WHERE Browser = 'Chrome'"));
    $Firefoxrows = mysqli_num_rows(mysqli_query($connection,"SELECT * FROM tbl_stats WHERE Browser = 'Firefox'"));
    echo 'Chrome' . " : " . $Chromerows . "   |   ". 'Firefox' . " : ". $Firefoxrows;
}

}

mysqli_close($con);

?>

```

So basically i have a database that stores when a user views from a certain browser, operating system and their ip.

I need to display on a page a hits counter showing the amount of hits from that browser, I've tried to follow tutorials and look up how to do this but have failed so far, i dunno if this is any close.