ok I have a little search engine like this $result = @("select * FROM resources WHERE catg=\"$catg\" and country=\"$country\" ");
the user selects the value from a drop down menu.
how can I make that if a user selects "all countries" in one of the drop down menus it will list ALL of them?
thanks
$result = @mysql_query('select * FROM resources WHERE catg="'.$catg.'" and country="%'$country.'%" ");
and put this in your drop down: <option value="">All countries</option>
thanks! I tried that but it gives me a parse error
I tried to correct it to this
$result = @mysql_query('select * FROM resources WHERE catg="'.$catg.'" and country="%'$country.'%" ');
but still gives me a parse error...
$result = @mysql_query('select * FROM resources WHERE catg="'.$catg.'" and country="%'.$country.'%" ');
missing . before $country ....