Page 2 of 2
Posted: Fri Jul 06, 2007 1:13 pm
by feyd
The search query is done via post. The landing page provides a search id and pagination through get.
Posted: Fri Jul 06, 2007 1:25 pm
by superdezign
feyd wrote:The search query is done via post. The landing page provides a search id and pagination through get.
And then saved via sessions...?
Posted: Fri Jul 06, 2007 1:44 pm
by feyd
superdezign wrote:And then saved via sessions...?
Cached in the database for a period of time.
Posted: Fri Jul 06, 2007 2:06 pm
by superdezign
That's an approach I haven't heard of before. Not something that would be done (efficiently) on a search engine.
Posted: Fri Jul 06, 2007 6:56 pm
by shivam0101
After using POST method, i am getting the results. Problem starts in the hyper links(first, previous, next, last). How to pass the search condition when i click on these links. The link conditions should not appear in the address bar.
Posted: Fri Jul 06, 2007 7:50 pm
by nathanr
you could always control all the paging by saving the current paging settings in session.. although why not just leave them in the uri?
Posted: Sat Jul 07, 2007 12:44 am
by shivam0101
$_SESSION['searchcond']=$_POST['cond'];
and in the each subsequent page i should use,
$condition=$_SESSION['searchcond'];
is that right. (after session_start at the top).
Posted: Sat Jul 07, 2007 11:06 am
by superdezign
That is a way to do it.
Posted: Sun Jul 08, 2007 10:04 am
by shivam0101
Thanks for helping me to solve this. This is how it was solved.
Code: Select all
<?php
echo '<form method='post'>';
?>
after i post,
Code: Select all
<?php
if($_POST)
$_SESSION['condition']=$_POST;
?>
for the navigation,
Code: Select all
<?php
$num=$_GET['num'];//next page
?>