| Andrew Nagy 2005-01-26, 8:56 pm |
| I am implementing cookies with my paged application so that I can come
back to the list without loosing my place. Basically the page number is
stored in the cookie. However I am experiencing some strange results.
My application is working fine as I page through the results, however
the list of pages is showing that I am on the previous page (obviously
because I have a cookie with the same name as the page variable).
Is their a way that I can specify the page I am on instead of pager
determining this for me with the $_REQUEST variable, or can the pager
code be modified as to not use the $_REQUEST variable but to use the
following if statement?
if (isset($_POST[$pageId])) {
...
} elseif (isset($_GET[$pageId])) {
...
} elseif (isset($_COOKIE[$pageId])) {
...
}
This will allow the use of cookies in conjunction with either a GET or
POST page value.
Is this the best way, or am I missing something?
Thanks
Andrew
|