Showing what was searched "for"

5 posts by 3 authors in: Forums > CMS Builder
Last Post: February 5, 2009   (RSS)

Probably another easy one but...[unsure]

I've added the following to the top of one of my category list pages:

<form method="POST" action="/alink/to/the/ListViewer.php">
<input type="text" name="title,content_keyword" value="">
<input type="submit" name="submit" value="Search">
</form>

and would like to show what was searched for in the resulting ListViewer.php page at the top ("Searched for: <value>"). Can someone help?

Thanks.

Eric

Re: [eduran582] Showing what was searched "for"

By Kenny - February 4, 2009 - edited: February 5, 2009

Eric,

Try using the multisearch.php file discussed here:

http://www.interactivetools.com/forum/gforum.cgi?post=61466#61466

I have also attached it here to this post. You can see it in action here:

http://www.johnsoncountyelections.com/search/index.php


Kenny
Attachments:

multisearch_001.php 4K

Re: [eduran582] Showing what was searched "for"

By Dave - February 5, 2009

Hi Eric,

If all you want to do is show the keyword that was searched for you can try this:

<?php echo @$_REQUEST['title,content_keyword'] ?>

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Showing what was searched "for"

Dave,

That was exactly what I was looking for! And as usual, your code worked great. BTW, the program sagentic re-pointed me to (multiSearch.php) works great as well. I now have a "site search" using the multiSearch.php file and an individual search within each section.

Thanks again for 1) a great program, and 2) excellent support! [cool]

Eric