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

From: Date: Fri, 18 Apr 2008 16:15:48 +0000
Subject: Re: How to keep GET variables in DataGrid and QuickForm?
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28813@lists.php.net to get a copy of this message
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 (#28813) next »