Gossamer Forum
Home : Products : DBMan : Customization :

Search on default.shtml

Quote Reply
Search on default.shtml
Can you help me?

I am trying to set up a seach form from the first page of my website, (which is a *.shtml page). I would like the search to only look in the descriptions and titles, and I would like the user to have an option of picking a category in which to search.

I have searched the forum for an answer on how to get the seach to work from outside of dbman, and it seems as if others are doing it. I was unable, however, to locate the code that they were using that would allow them to do so.

For starters, I assume that I would need to put in the search from some hidden fields, like
Code:
<input type="hidden" name="db" value="default">
<input type="hidden" name="uid" value="default">

Here is what I am thinking:
Code:
<form method="post" action="?????">
<img border="0" src="images/mag.jpg" width="11" height="11">
<font color="#003300"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">S</font><font face="Verdana, Arial, Helvetica, sans-serif" size="1">ELECT
A </font><font face="Verdana, Arial, Helvetica, sans-serif" size="2">C</font><font face="Verdana, Arial, Helvetica, sans-serif" size="1">ATEGORY</font></font>
<br>
<select name = "index">
<option value= "books"> Books
<option value= "music"> Chairs
<option value= "none" selected> Select One
</select>

<input type="hidden" name="db" value="default">
<input type="hidden" name="uid" value="default">

<input type="text" name="keyword-search" size="15">
<img border="0" src="images/go.jpg" width="20" height="20">
</form>

Do you know how to make this work!?!

[This message has been edited by dataKing (edited January 31, 2000).]
Quote Reply
Re: Search on default.shtml In reply to
Uh...search this forum more carefully and you will find the answer...

Anyway, use the following codes:

Code:
<form method="get" action="http://www.yourdomain.com/cgi-bin/dbman/db.cgi">
<input type="hidden" name="db" value="default">
<input type="hidden" name="uid" value="default">
<input type="text" name="TITLE" size="15">
<select name = "index">
<option value= "---" selected>Select One
<option value= "books"> Books
<option value= "music"> Chairs
</select>
<input type="submit" name="view_records" value="Search">
</form>

Change TITLE to the name of your title field.

Hope this helps.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------