View Full Version : check values posted from search to results page

10-26-2009, 03:45 PM

How do i check the values posted from a search form to a results page?
I have set up 4 menus which post results but not all menus have to be selected by the user and i need to establish how many of the menus have had an option selected to filter my results, can anyone tell me how to do this?
IŽm thinking i need to compare the number of values sent to the number of menus , iŽm still learning php so all input is appreciated.


10-26-2009, 06:23 PM
I am struggling to understand the question and I am by no means a php guru but have you gone down the route of
$var = 0;

// Evaluates to true because $var is empty
if (empty($var)) {
echo '$var is either 0, empty, or not set at all';

// Evaluates as true because $var is set
if (isset($var)) {
echo '$var is set even though it is empty';

10-26-2009, 06:50 PM

thanks for replying, iveŽbeen working on some code using the if isset but hadnŽt thought about if empty and thats may be useful, as a learner iŽm just trying different things with the code and seeing if it works. Any further responses may be of use to me,