I'm writing a script for a search engine where all fields need to be able to have information submitted by themselves, or in combination with other fields. The fields are Name, City, State, ZIP, Country, Category_1. The code is below:
"SELECT * FROM table WHERE Name LIKE '%$get_name%'
OR City LIKE '%$get_city%'
OR State LIKE '%$get_state%'
OR ZIP LIKE '%$get_zip%'
OR Country LIKE '%$get_country%'
OR Category_1 LIKE '%$get_category1%'
LIMIT 0, 10";
If I echo all the variables, from the inputs, they all come out correct. However, the query brings up the same results regardless of what the user input was. Any suggestions? It seems to be a problem with the MYSQL query itself.