Gossamer Forum
Home : Products : DBMan : Installation :

Searching Database From Homepage

Quote Reply
Searching Database From Homepage
Hey all...There was another message back on May 11th that dealt with this.
I want to allow users to search out our database from our main page without being logged in, however when I tried the code you suggested I could not get it to work...it would come back with an invalid search error of some type. The code is this:
<form action="http://www.server.com/cgi-bin/db.cgi" method="GET">
<input type=hidden name="db" value="default">
<input type=hidden name="uid" value="default">
[your search form fields]
<INPUT TYPE="SUBMIT" NAME="view_records" VALUE="View Records">
<INPUT TYPE="RESET" VALUE="Reset Form">
</form>

What I would like to know is what my SEARCH FORM FIELDS should look like? I use wizards and I just can't get my FORM FIELDS to work properly with the above code.

Any help would be greatly appreciated, before I go bald.
Quote Reply
Re: Searching Database From Homepage In reply to
<form action="http://www.yourcompany.com/cgi-bin/db.cgi" method="GET" >
<input type=hidden name="db" value="default">
<input type=hidden name="uid" value="default"><select Name="NAME" size="1">
<option VALUE=""></option>
np
<option VALUE="URL">URL</option>
</select>
<input type="Submit" Name="view_records" value="Search"></font>
</form>
Quote Reply
Re: Searching Database From Homepage In reply to
It all depends on what you want people to be able to search on. Give the names of your input fields the same names as your database fields.

You said you got "an invalid search error of some type." If we know what type of search error you got, we'll be able to help a little more.


------------------
JPD





Quote Reply
Re: Searching Database From Homepage In reply to
Gentlemen thank you for your quick response...here is the CODE I have been using. Oh, the error I get is "UNKNOWN ACTION".

<form action="http://www.castnets.net/cgi-bin/dbman/db.cgi" method="GET">
<input type="hidden" name="db" value="default"><input type="hidden" name="uid"
value="default">

</td>
<td valign="top" width="235" height="36"><font size="-1" face="arial, helvetica"><b>Search
our database </b></font><br>
<select NAME="Location" size="1">
<option>Location</option>
<option>St.Simons Island</option>
<option> Sea Island</option>
<option> Jekyll Island</option>
<option> Cumberland Island</option>
<option> Sapello Island</option>
<option> Brunswick</option>
<option> Other</option>
</select><br>
<select NAME="Category" size="1">
<option>Category</option>
<option>Restaurant</option>
<option> Accommodation</option>
<option> Shopping</option>
<option> Recreation</option>
<option> Other</option>
</select><br>
<input type="text" size="25" name="search" value""></td>
<td valign="middle" width="236" height="36"><input type="image" src="images/searchani.gif"
border="0" alt="Search our database" value="View Records" name="view_records" WIDTH="75"
HEIGHT="57"> <a href="http://www.amazon.com/exec/obidos/redirect-home/castnetcommunica"><img
src="images/amazonlogo.gif" alt="amazonlogo.gif (2237 bytes)" border="1" WIDTH="130"
HEIGHT="45"></a></td>
<td valign="top" width="2" height="36" bgcolor="#FFFFFF"></td>
</tr>
</table>
</td>
</tr>
</form>

I use the searchani.gif instead of SEARCH button. Thanks folks for all your help...I know I am close :-)

http://www.castnets.net

Quote Reply
Re: Searching Database From Homepage In reply to
The "unknown action" is because you're using the image as the submit button. In order to use the image, you also have to add

<input type="hidden" name="view_records" value="1">



------------------
JPD





Quote Reply
Re: Searching Database From Homepage In reply to
Thanks Guys. I have managed to get the search fields up and running to my liking. I will takle that IMAGE issue after I know this will be stable.
Thanks again for your help.