PDA

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


LoobyLou
10-26-2009, 04:45 PM
Hi,

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.

LoobyLou

urbanrays
10-26-2009, 07: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
<?php
$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';
}
?>

LoobyLou
10-26-2009, 07:50 PM
Hi,

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,
cheers

LoobyLou