Gossamer Forum
Home : Products : DBMan : Installation :

HTML Form Settings Outside cgi-bin

Quote Reply
HTML Form Settings Outside cgi-bin
I've downloaded & successfully run the Demo DB in my cgi-bin.
Now I want to set up a form on a html page outside the cgi-bin and call data to it from a text command in the html page. Is there a tutorial for this or can someone help, especially with the form and field settings.
Quote Reply
Re: HTML Form Settings Outside cgi-bin In reply to
Thanks for that, I'm getting the drift.

What about if I have a form only that, on html page loading, populates with data automatically. Using the demo as an example, field=Title and search = software.
If I have a form with two fields, Title & Description would the following be in order:
<form action="http://www.url.com/cgi-bin/dbman/db.cgi" method="GET">
<input type=hidden name="db" value="default">
<input type=hidden name-"uid"value="default">
.
Quote Reply
Re: HTML Form Settings Outside cgi-bin In reply to
You got it, I think. Smile

After those fields you mentioned, you would add fields for the search. The name of each of the form fields would correspond to a name of a field in your database.

Then you would finish it off with

<input type="SUBMIT" name="view_records" value="Search">
</form>



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





Quote Reply
Re: HTML Form Settings Outside cgi-bin In reply to
Ok, I'll give a go, see you in a few hours.
Thanks for your help.

Regards, ProDen
Quote Reply
Re: HTML Form Settings Outside cgi-bin In reply to
Do you want links or do you want a form? What commands do you want to call from the html page?


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





Quote Reply
Re: HTML Form Settings Outside cgi-bin In reply to
Plant Hire Example:
On the html page I have a text list of equipment for hire
Woodworking.
Dumper Trucks.
Ladders. etc
I want a visitor to click on the text and a list of equipment from the database to appear on that page.
I assumed a form is required to enable settings to call the database from cgi-bin/dbman/db.cgi or am I on the wrong track.
Quote Reply
Re: HTML Form Settings Outside cgi-bin In reply to
So you want them to do a search using text links.

Here's how to make the text link:

<a href="http://url/to/db.cgi?db=default&uid=default&view_records=1

(Change the db=default if your .cfg file is not called "default.cfg")

The rest of the URL depends on how your database is set up. Basically, the syntax is

&FieldName=value

So, if your field name for the equipment was called "Type," you would use

<a href="http://url/to/db.cgi?db=default&uid=default&view_records=1&Type=Woodworking">

One other thing to be aware of when you're creating links to search by -- if you have a space, you must replace it with a +.

<a href="http://url/to/db.cgi?db=default&uid=default&view_records=1&Type=Dumper+Trucks">

Be sure that your field name is exactly the same as you have defined it in your .cfg file. *Case counts!!*


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