View Full Version : search syntax
Lionel
06-05-2005, 03:36 PM
I created a custom field Select (Preset options in a drop-down select box) named type and I would like to place it on my pages to allow searches only for that field. What would the syntax be? I am looking for something like search.php?field=xx
The results gives me 'do=searchresults&searchid=2' and I am not able to get the syntax for hardcoding
Lionel
06-08-2005, 12:48 AM
OK, let me rephrase that. Say I have a category named USA, and a custom field select box with all the States. I want to be able to put a select box in all my pages (I will hard code if I have to) where on select a State it returns all entries for that State. In search.php page I see a checkbox option to query that custom field. What I'd like to know is what's goes behind the scenes when just a field is selected? Something like search.php?term=Florida maybe?
So please what should I place on that form?
Lionel
06-08-2005, 01:20 AM
OK, never mind. I figured it out.
absolutepunknet
06-26-2005, 05:21 PM
What did you do?
Lionel
06-26-2005, 05:30 PM
<form name="form" method="post" action="http://www.site.com/links/search.php?">
<select name="select">
<option selected>View By [field]</option>
<option name="string" value="$field1">$myfieldname</option>
</select>
<input name="s" type="hidden" value="$session[sessionhash]" />
<input name="do" type="hidden" value="searchresults" />
<input type="hidden" name="matchwholeword">
<input type="hidden" name="cfields[]" value="field1">
</form>
</body>
then thru javascript you put a select box to select a name.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.