Back URL function and keeping search criteria - From Natasha

Reply

Join Date: Aug 2008
Posts: 37
Reputation: 123468743867143 is an unknown quantity at this point 
Solved Threads: 0
123468743867143's Avatar
123468743867143 123468743867143 is offline Offline
Light Poster

Back URL function and keeping search criteria - From Natasha

 
0
  #1
Nov 6th, 2008
I operate a real estate directory site.

Trouble of the day: Cannot get my Back URL to go back to the previous page with all the user' search criteria still there. It goes back to the page and they have to fill their criteria again.

Example: They pick Fiji and Islands For Sale, get a listing of Fiji islands, pick one, look at it, click on Back, return to search page but they have to reenter Fiji and Islands For sale.

My current code on my details.php:

$a = getenv('HTTP_REFERER');
//echo"hererer".$a."<br>";
$pos =strpos($a,"qualify_search");
if($pos<>""){
$bck_url="qualify_search.php?listid=$record[listingid]&amp;region_id=$_REQUEST[region_id]&amp;property_type=$_REQUEST[property_type]&amp;country_id=$_REQUEST[country_id]&amp;state_id=$_REQUEST[state_id]&amp;maxprice=$_REQUEST[maxprice]&amp;minprice=$_REQUEST[minprice]&keywordtxt=$_REQUEST[keywordtxt]&option_page=$_REQUEST[option_page]";
}
//echo"position".$pos;
//$baray=explode("/",$a);
/*
switch($baray[4]){
case"qualify_search.php":
$bck_url="qualify_search.php?listid=$record[listingid]&amp;region_id=$_REQUEST[region_id]&amp;property_type=$_REQUEST[property_type]&amp;country_id=$_REQUEST[country_id]&amp;state_id=$_REQUEST[state_id]&amp;maxprice=$_REQUEST[maxprice]&amp;minprice=$_REQUEST[minprice]&keywordtxt=$_REQUEST[keywordtxt]";
break;
}

It seems simple enough. What is wrong with me today?
Thanks for your help.

Natasha
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 524
Reputation: Will Gresham is on a distinguished road 
Solved Threads: 86
Sponsor
Will Gresham's Avatar
Will Gresham Will Gresham is offline Offline
Posting Pro

Re: Back URL function and keeping search criteria - From Natasha

 
0
  #2
Nov 6th, 2008
Do you mean the back button on the browser or do you have a back link on the page?

With your code you should be able to go back using the url vars, but depending on how your search page works it may not work with the browsers back button
Last edited by Will Gresham; Nov 6th, 2008 at 3:53 pm.
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 37
Reputation: 123468743867143 is an unknown quantity at this point 
Solved Threads: 0
123468743867143's Avatar
123468743867143 123468743867143 is offline Offline
Light Poster

Re: Back URL function and keeping search criteria - From Natasha

 
0
  #3
Nov 6th, 2008
I have a Back button on the page itself (IE: Click here to return to previous page).

The Back arrow on browser does not work, it refreshes the search.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 37
Reputation: 123468743867143 is an unknown quantity at this point 
Solved Threads: 0
123468743867143's Avatar
123468743867143 123468743867143 is offline Offline
Light Poster

Re: Back URL function and keeping search criteria - From Natasha

 
0
  #4
Nov 6th, 2008
Hey forgot to say Hello. Sorry.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC