Gossamer Forum
Home : Products : DBMan : Discussions :

Search db from other html pages?

Quote Reply
Search db from other html pages?
Hi. I have my database up and running beautifully - thank you, everyone, for building and maintaining such a strong, helpful community here -- but now I want to be able to search from another html file as well as display the data in another html file. I am building a robust and ever-changing website and fear I'll go mad if I have to work in perl to format and change it. Anyway, can I use simple html forms to search and display the forms and how would I do so?

Thanks!

Amy

Quote Reply
Re: Search db from other html pages? In reply to
In order to set up an external search form, you need only put together a form with code similar to that which is generated by the database. You will also need to set up a default user if you have not already done so.

A typical search form may look like:
Code:

<form method="get" action="http://www.server.com/path/to/dbman/db.cgi">
<input type="hidden" name="db" value="default">
<input type="hidden" name="uid" value="default">
<input type="hidden" name="view_records" value="1">
Keywords: <input type="text" name="keyword" size="20">
<input type="submit" value="Search">
</form>
Including the results in a webpage is a little more difficult and will require the use of SSI, try searching through the forums, and LoisC's helpful FAQ (listed in the Resource center) for SSI.

Good luck!

- Mark


Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: Search db from other html pages? In reply to
Thank you! I'll search for SSI and LoisC.

Amy