获得结果提交标准。 PHP-MySql查询

Hi I'm trying to do filter through the form with which it is set by the user criterion to return the items, which include those criteria.

Code:

$filter = " SELECT * FROM images WHERE (id = '$_GET[numPic]' OR id = NULL)  OR (img_content = '$_GET[nmPic]' OR img_content = NULL) OR (category = '$_GET[picCat]' OR category = NULL) OR (price <= '$_GET[priceTo]' OR price = NULL)";
                $resFilter = $connect->query($filter);

                if ($resFilter->num_rows > 0) 
                {

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

                        //show results...

                    }

                }
            }

With this application if I submit my two parameters brings all elements with one parameter and all elements with the other parameter, not just the items which include both parameters. Please tell me where I'm wrong?