Using search results in results page.

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 5, 2010   (RSS)

By Thomas - April 4, 2010

I would like to be able to use search results in the content of the search results page. For example, if a search was for:

search.php?age_min=30&age_max=40&hair_color=Brown&eye_color=Blue

then I would be able to use $age_min, $age_max, $hair_color and $eye_color in the next page.

Is that possible?

Many thanks.

Re: [Thomas] Using search results in results page.

By Jason - April 5, 2010

Hi,

Yes, you can access variables in the URL query string like this.

$_REQUEST['variable'];

Where 'variable' is the name in the query string. So the code:

$age_min=$_REQUEST['age_min'];

will take the 'age_min' variable from the query string (in this case 30) and assign it to the variable $age_min.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/