In my PHP application I have several options for sort, say, clicking on one link will put ?vendor=1 into the query string and it will affect the data coming from the database, and I have another link which sets another value as a sort condition. In normal it will look like the following:
http://somesite.com/index.php?vendor=1&site=2
However, when the query string has only one variable, say ?vendor=1 and I click on the second link to set the second sort variable, the query string is being reset and I get only the second variable in the query string. One of those variable setters is a select and the other is a link.
Could anybody help me with this, please?
Thanks.
You can store the criterias in a session variable, that in contrast to the request parameters are preserved between requests.
In PHP, the session variable is accessed through the
$_SESSIONarray variable.