I am creating a search bar which will search the query from every column of my database table and will prompt the output I am doing this with php and mysqli but now I dont have any idea to how do I show my output. can anybody help me here is my code
if(!$db) {
require("includes/db.php")
echo 'ERROR: Could not connect to the database.';
} else {
if(isset($_POST['queryString'])) {
$queryString = $db->real_escape_string($_POST['queryString']);
if(strlen($queryString) >0) {
$query = $db->query("SELECT * FROM mdb WHERE name LIKE '%" . $queryString . "%' OR grno LIKE '%". $queryString ."%'
OR `address` LIKE '%". $queryString ."%', `city` LIKE '%". $queryString ."%' OR pin LIKE '%". $queryString ."%'
OR mobile LIKE '%". $queryString ."%' OR `email` LIKE'%". $queryString ."%' ORDER BY vouchno LIMIT 8");
if($query) {
$catid = 0;
while ($result = $query ->fetch_object()) {
//no idea how do I show the result here
}