Not clear what you're asking here.simonmlewis wrote:Ok two issues.
1) at what point does it store the content of the variables that have been passed through the URL?
$powered does not appear to even be defined. That aside, if $_GET['powered'] is 'showall' and you don't want to use that in your query, just unset the array key or don't set it in the first place.simonmlewis wrote:2) how do I clear the variable if I want to reset, using the powered=showall in the URL?
This doesn't do it.Code: Select all
if(isset($_GET['powered'])) { $query_params['powered'] = $_GET['powered']; if ($powered == "showall") { $query_params['powered'] = NULL;} $_SESSION['powered']=$powered; } elseif (isset($_SESSION['powered'])) { $query_params['powered'] = $_SESSION['powered']; }