Here's the issue.
MySQL queries are structured, hence the name 'Structured Query Language'.
As mentioned earlier, a typical MySQL statement would be
- SELECT * FROM cars WHERE color = 'red' AND make = 'VW'
The PHP to make this be able to be dynamic is:
- SELECT * FROM cars WHERE color = '$color' AND make = '$make'
Now you have to ask, how is $make and $color obtaining it's values? Via user input through a single text box? Okay, well what potential issues might we run into? Well what if the user puts in "vw red" as a search? Even if we made a PHP code to select the first word in the box as the color, and the second word as the make (ie, red vw), we're still trusting that the user will be smart enough to read instructions.
So let's say the user enters 'vw red' as a search, our PHP take the first word and make it '$color' and then it takes the second word and makes it '$make', Well in this case that's wrong, as our SQL statement will then end up quering the database like so:
- SELECT * FROM cars WHERE color = 'vw' AND make = 'red'
Which will not work. What you could TRY doing (if you really are set on ONE textfield) is adding a 'description' to your SQL table for each item, and have the query search for all cars with 'red' and 'vw' in the description field. But again, that's a pretty bad way of doing it.
If you like at 95% of the autodealer sites, you'll see that they offer drop down options for this very reason. There's too many variables for a standard user to get right, so you should define them for the user wherever possible. This would be one of those times.