Hello. I'm having some problems getting an "advanced" search to work on a website I'm building. The search entails any combination of three parts - keyword, category and list. My code looks like this:
if (($keyword) && (!$category) && (!$listName)) {
$select = ....
} elseif (($keyword) && ($category) && (!$listName)) {
$select = ....
} elseif etc... {
and every combination of the three values finally ending with...
} elseif (($keyword) && ($category) && ($listName)) {
$select = ...
}
For some reason, no matter the combination of values entered by the user, the script only generates output according to the first condition - the keyword being the only value inserted into the search.
I'm not sure what the problem is. I've setup echo's for each of the variables before and after the conditions to ensure the values are being passed to the search, and they are. So it appears it is something with my conditions.
I'd appreciate any help you can give.
Thanks alot,
--Joel