I have a script which instantiates a class thusly:
Code: Select all
$searchResultsObject = new search_results($_GET,'simple');
Code: Select all
function __construct($queryString,$type) {
. . .
$this->queryString = $queryString;
. . .
}
Code: Select all
private function set_searchFields() {
foreach ($this->queryString as $field => $value) {
//don't deal with search button portion of the query string
if ($field != 'submit') {
//but deal with everything else here
if ($value != '') {
//these are the criteria entered
$this->searchFields[$field] = $value;
}
}
}
}