如何将pagination的get参数添加到url的末尾?

I'm using pagination and also advantage search options in a page.

Search is working great. For example, when I use the search, url is like this:

http://example.com/category/contents?**title=test&year=2015&author=test**

It's okay. But when I use the pagination links, all search parameters are gone..

http://example.com/category/contents?**page=3**

How can I solve this?

I want to do this:

http://example.com/category/contents?title=test&year=2015&author=test&**page=3**

EDIT: Okay, I'm using like that now:

$parameters = "";

if(isset($_GET["x_param"])){
    $parameters .= "&parametername=".$_GET["x_param"]    
}

And I'm adding the $parameters variable to the end of pagination links.

?page=xx".$parameters

Store the required values from URL in variables like follow.

$title="";

if(isset($_GET["name"])) {
   $title=$_GET["title"];
}

In above code we're saving value of title parameter in $title variable if it is set. You can do the same for other values.

Now pass this values when you're hitting the next or previous page along with page number.

In pagination you need to change parameter from http:://mysite.com/category/contents?page=3

to

http:://mysite.com/category/contents?page=3&title=$_REQUEST['title']&year=$_REQUEST['year']&author=$_REQUEST['author']