Please can you help on this matter. I have four boxes on the submit page passing values to the results page that is opening a data base for results. On the search it works fine if i fill all four baxes out, but returns nothing if i leave two empty. The form only asks for two to be filled, the others are optional, but as said if they are left blank no reult in the WHERE is return as though it is looking for any blank feilds?
$SQL="SELECT * FROM tblusers WHERE 1 AND world
LIKE '$HTTP_POST_VARS[world]' AND sector
LIKE '$HTTP_POST_VARS[sector]' AND country
LIKE '$HTTP_POST_VARS[country]' AND service
LIKE '$HTTP_POST_VARS[service]' OR world
LIKE '$HTTP_POST_VARS[world]' AND sector
LIKE '$HTTP_POST_VARS[sector]'
ORDER BY id ASC";
I am not great at PHP but learing fast. Can you offer simple to follow solution to this matter?
Thanks Jason