FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » pagination driving me insane
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: pagination driving me insane [message #174622 is a reply to message #174617] Wed, 22 June 2011 16:57 Go to previous messageGo to previous message
Co is currently offline  Co
Messages: 75
Registered: May 2011
Karma:
Member
On 22 jun, 17:54, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> On 6/22/2011 8:50 AM, Co wrote:>>> Marco
>
>>> So, make up your mind.  Do GET or POST - don't try to do both.
>
>>> And once again - look at what you have in your $_GET and $_POST arrays,
>>> and use them to trace through the code.  Figure out what it's doing.
>
>  > Jerry,
>  >
>  > i need the POST to search in my members accounts.
>  > The problem is that PHP loses the query I run when I goto the next
>  > page.
>  > I preferred using a session variable but I wasn't able to get rit of
>  > the variable after I filled it. So everytime when I come back to the
>  > page it will automatically use the session variable again.
>  > Or is there a way to clear the session variable when I load the page?
>  >
>  > Marco
>  >
>  >
>
> <Top posting fixed>
>
> No, it's no longer there because the browser didn't send it.  PHP didn't
> lose anything.  From the browser's point of view, each page is a new
> request to the server, and the browser sends only what you tell it to send.
>
> What you need to do is determine if this a new search or a continuation
> of the previous search (i.e. display the next page).  If the former,
> clear your old $_SESSION values (if any) and put new ones in there and
> display the first page.  If the latter, use the data stored in the
> $_SESSION and display the next page of the search.
>
> There are any number of ways to determine if it is a continuation page;
> i.e. the $_GET or $_POST value has "page=next" or "page=3" in it; the
> current page number is in a hidden field in the form or similar.  A new
> search wouldn't have those values.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================
>
>

I will try to work on that.
But can I clear the session before I open the page so that an
older session that I used ealier will be cleared until I hit the
submit button? I don't want to clear the whole sessions just the one
variable.

Marco
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IP address and empty $_FILES
Next Topic: Command line cannot fwrite, browser can
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 08 16:24:37 GMT 2024

Total time taken to generate the page: 0.04053 seconds