Vous pouvez vérifier quels champs sont définis et effectuer une requête en conséquence lors de l'exécution. vous pouvez faire quelque chose comme ça :
$query = "";
$keyword = $_REQUEST['keyword'];
$country = $_REQUEST['country'];
$category = $_REQUEST['category'];
if(isset($keyword)){//if keyword set goes here
$query = "SELECT * FROM table1 WHERE Name LIKE '%$keyword%' OR ZipCode LIKE '%$keyword%' OR country LIKE '%$keyword%'";
if(isset($category)){
$query .= "AND category LIKE '$category'";
}
if(isset($country)){
$query . = "AND country LIKE '$country'"
}
}else if (isset($category)){ //if keyword not set but category set then goes here
$query = "SELECT * FROM table1 WHERE category LIKE '$category'";
if(isset($country)){
$query . = "AND country LIKE '$country'";
}
}else if(isset($country)){//if only country set goes here
$query = "SELECT * FROM table1 WHERE country LIKE '$country'"
}