Reload the page without losing variables
| From: | Achilleas Maroulis | Date: | Wed, 28 Aug 2002 11:36:08 +0000 |
| Subject: | Reload the page without losing variables | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-21417@lists.php.net to get a copy of this message | ||
Hi.
I have a little problem concerning passing variables or reloading the page.
I have a search fom page (search.php) which POSTS some variables to another page displaying the
results (results.php). What I want to do is to let the users change the order of appearance in the
last page. I thought I should use a variable named $order and put it into the select string like
this:
SELECT fields... FROM tables... WHERE expresions ORDER BY $order ASC
and then make a link of the header of each column like this:
<a href=\"results.php?order=HEADER_NAME\">HEADER_NAME</a>
This would force the page to reload with a new order of appearance of the results but if I do this I
will lose all the other variables that came to this page by the previous form.
I wonder if there is a better way to refresh the page, without losing my variables, than using
sessions or by sending again all my variables through the url (it would become too big and ugly...)
With a great respect to this list (it has helped me alot in the past),
Achilles