Showing what was searched "for"
5 posts by 3 authors in: Forums > CMS Builder
Last Post: February 5, 2009 (RSS)
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
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
Re: [sagentic] Showing what was searched "for"
By eduran582 - February 4, 2009 - edited: February 4, 2009
Thanks for replying. I've downloaded and looked ath the multisearch.php file and have looked at that link. I tried a few things with only the basic results. I guess I'm just not sure where or what to use in that file but will forge ahead and figure it out.
Appreciate your help.
ADDED (shortly after the above):
I think it was a matter of "couldn't see the forest for the trees" as I figured it out! I was getting errors because I didn't notice the difference in the variable's. Thanks for giving me the incentive to continue on!
Eric
Re: [eduran582] Showing what was searched "for"
By Dave - February 5, 2009
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!
interactivetools.com
Re: [Dave] Showing what was searched "for"
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