I have users current latitude and longitude saved as the variables $latitude  and $longitude. I only want the data from the database to echo out if the latitude and longitude matches the users current latitude and longitude. 
$con=mysqli_connect("localhost","db_username","password","db_dbname");
$stmt = $con->prepare('SELECT * FROM test WHERE geoloc1 = ? and geoloc2 = ?');
$stmt->bind_param('ss', $latitude, $longitude);
$stmt->execute();
$result = $stmt->get_result();
while ($row = $result->fetch_assoc()) {
?>
            <div class="latlon">
                <a><?php echo $row['geoloc1'] ?></a>
            </div>
<?php
}  
?>
yet Im getting the error Fatal error: Call to undefined method mysqli_stmt::get_result() and I can't seem to solve why its coming up!
 
    