PHP在URL中使用$ GET过滤json

I want my json be filtered with two rows using $GET in the url where I can type something like http://carkila.esy.es/carkila/user.php?owner=ownerANDstatus=pending can you please help me fix my code thanks. :)

<?PHP
include_once("connection.php");

session_start();

$where = '';
if (isset($_GET['owner']) && isset($_GET['status'])){
$where = " WHERE owner like '%".addslashes($_GET['owner'])."%' AND status like '%".addslashes($_GET['status'])."%'";
}
$query = "SELECT * FROM tbl_cars ".$where." ORDER BY Car_No DESC"; 

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

while ($row = mysqli_fetch_assoc($result)) {
$data[] = $row;
}
 echo json_encode($data);

?>

Use this: owner&status arguments seperator for a url.

You can also use http_build_query (array('owner'=>'owner','status'=>'pending'))

to generate owner=owner&status=pending