PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sat Jun 24, 2017 12:23 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Fri Oct 28, 2016 10:05 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6249
Location: Montreal, Canada
simonmlewis wrote:
Ok two issues.
1) at what point does it store the content of the variables that have been passed through the URL?

Not clear what you're asking here.

simonmlewis wrote:
2) how do I clear the variable if I want to reset, using the powered=showall in the URL?

Syntax: [ Download ] [ Hide ]
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'];
}

This doesn't do it.

$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.

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group