Re: Coding Advice
| From: | Matt M. | Date: | Wed, 21 Jul 2004 15:28:00 +0000 |
| Subject: | Re: Coding Advice | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-191326@lists.php.net to get a copy of this message | ||
> I am writing an app and right now im working on code that will display x
> number of items on one page, and if there is overflow, provide a link to
> the next. The url coming into the page looks something like:
>
> projects.php?action=view&completed=no&start=0
>
> My code so far, i just took the $_SERVER['REQUEST_URI'] and added
> start=newstart to the end.
>
> The problem is, i will eventually get a string thats very long, ebcause
> start keeps appending onto the end. What is the easiest way to preserve
> projects.php?action=view&completed=no and be able to add start=somenumber
> to the end?
if you only need to pass 2 other variables, why not just build the
query string from scratch each time?
you could always do a string replacement on start=whatever instead of
just appending it to the end each time.