Re: Problem with Pager 2.1.0
| From: | Ian Eure | Date: | Mon, 12 Jan 2004 22:52:05 +0000 |
| Subject: | Re: Problem with Pager 2.1.0 | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25023@lists.php.net to get a copy of this message | ||
On Monday 12 January 2004 02:35 pm, Stephan Wentz wrote:
> Lorenzo Alberton wrote:
> > On Mon, 12 Jan 2004 22:44:56 +0100, Stephan Wentz wrote:
> >>How do I add URL-Variables to the Pager?
> >>Of course it adds all $_GET-Variables, but I need to carry a few
> >>variables that come in through a POST-call first time.
> >
> > what about setting them as $_GET variables before building the pager?
> >
> > ==========
> >
> > if (isset($_POST['myvar']) {
> > $_GET['myvar'] = $_POST['myvar'];
> > }
> >
> > $pager = new Pager($options);
> > ==========
>
> No, this does not work, Pager_Common reads the get-variables through the
> $_SERVER['QUERY_STRING'] on line 572 :(
>
It's pretty ugly, too.
> Any other suggestions?
>
You could always use GET to pass the variables on the first script invocation
instead of POST. Seems like the simplest way of doing things.