I am building the search result page for an application. The application has 3 or 4 different searching pieces on one file. That is, a search for users or search for orders which POST to a file called search.php.
What I need though is a way to remove a section of string that doesn't focus on the search parameters. So I was thinking of a way to find the location of the last character of search parameters and remove everything else that was appended to it. How would I do this?
IE
search.php?action=search&username=blah&page=1
What I need to remove is &page=1, but everything else to be kept the same.