Re: How to keep GET variables in DataGrid and QuickForm?

From: Date: Fri, 18 Apr 2008 16:30:09 +0000
Subject: Re: How to keep GET variables in DataGrid and QuickForm?
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28814@lists.php.net to get a copy of this message
Thanks a lot for your help! I'll try it soon. Cheers, Bernhard. PS: That was just an example :) The page is nicely secured. Olivier Guilyardi schrieb:
Bernhard Harb a écrit :
I call sub pages in my index.php via a GET-Variable, f.e. an correct URL
    
could be: http://www.example.com/index.php?page=contacts
That means, that contacts.php is included and shown. Inside this, I use a PEAR::Structures_DataGrid to output some contacts. But when I click on the title of a column, the parameter "page" is gone.
      
Structures_DataGrid automatically forwards GET parameters, but your page parameter collides with its own page argument. To avoid collision, add a prefix to SDG's parameters with something like: $datagrid->setRequestPrefix('sdg_'); This way, your page argument should be forwarded and SDG will use sdg_page. PS: I hope you carefully check your page argument, because what you're doing is a dangerous practice (an attacker could try something like page=/etc/passwd). Regards, -- Olivier


« previous php.pear.general (#28814) next »