Gossamer Forum
Home : Products : DBMan : Installation :

Search links in html form

Quote Reply
Search links in html form
I created a search form in html. I would like to keep this format,if I can. My search can be done by categories through a menu list (listing all that is under that category) and by name (Last name First). I like my visiters to access the database without logging in. Only the Administrator will be able to add and modify and delete records.
Question: How do I create a link so that it will bypass the login function and go directly to the database using the html form. To get clearer understanding: visit www.activitypost.com. Thanks for your time

Always on a mission!!
Quote Reply
Re: Search links in html form In reply to
Add the following arguments in the query string (search link)....

Code:

&uid=default&db=default


Like you should have for the List All option.

Regards,

Eliot Lee

Quote Reply
Re: Search links in html form In reply to
I am not sure where to put this code. I am really new at this.
This is part of my html coding:

<FORM NAME="form1">
<font face="Arial, Helvetica, sans-serif" size="2">
<b>Events</b>
<select name="select1" onChange="surfto1(this.form)" size=1>
<option value="http://www.activitypost.com/cgi-bin/dbman/db.cgi?db=mydb&uid=default&view_records=1&Category=Birthdays">Birthdays </option>
<option value="http://www.activitypost.com/cgi-bin/dbman/db.cgi?db=default&uid=admin.97100563715499&ID=&Title=&URL=&Type=---&Date=12-Dec-2000&Category=---&Description=&keyword=&mh=10&sb=---&so=ascend&view_records=View+Records">Weddings </option>
<option value="http://www.activitypost.com/cgi-bin/dbman/db.cgi?db=default&uid=&ID=&Name=&Date=&Category=Anniversaries&Message=&keyword=&mh=10&sb=---&so=ascend&view_records=View+Records">Anniversaries </option>
<option value="http://www.activitypost.com/cgi-bin/dbman/db.cgi?db=mydb&uid=default=&ID=&Name=&Date=&Category=Birth+Announcements&Message=&keyword=&mh=10&sb=---&so=ascend&view_records=View+Records">Birth Announcements </option>
<option value="nutra.html">Holiday Wishes </option>
<option value="nutra.html">Get-Togethers </option>
<option value="nutra.html">Matters of the Heart </option>
<option value="0"> </option>
</select>
</font><p>
<CENTER>
<b>Search by name</b>
<CENTER>
<font face="Arial, Helvetica, sans-serif" size="1">Last name
first.
Example: Hayes, John
OR
Only the Last name
Example: Hayes </font>
</CENTER>
<input type="text" name="search" size="35">


</CENTER>
</form></CENTER>

the menu list is part of a javascript where a selection can be made automatically. Only thing I need to do is type the http://...). I am not sure how I can implement this with the answer you gave me.
Thanks

Always on a mission!!
Quote Reply
Re: Search links in html form In reply to
Ah...so it is NOT a link you are referring to, but a FORM! Tongue

You need to add hidden fields in the form (as mentioned quite a few times in the DBMAN forums)....

Code:

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


Regards,

Eliot Lee

Quote Reply
Re: Search links in html form In reply to
This is my index.html. I am using a java script for one section of this form:
<html>
<head>
<title>Onlinegreet.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">

</SCRIPT>
</head>

<body bgcolor="#FFFFFF">
<table width="63%" border="0">
<tr>
<td width="44%">
<h1><img src="images/heading.gif" width="270" height="36"></h1>
</td>
<td width="10%"><img src="thumbnails/baby.jpg" width="72" height="72"></td>
<td width="9%"><img src="thumbnails/birthday.jpg" width="72" height="72"></td>
<td width="9%"> <img src="thumbnails/together.jpg" width="72" height="72"></td>
<td width="9%"><img src="thumbnails/family.jpg" width="72" height="72"></td>
<td width="9%"><img src="thumbnails/couple.jpg" width="72" height="72"></td>
<td width="10%"><img src="thumbnails/wed.jpg" width="72" height="72"></td>
</tr>
</table>
<table width="94%" border="0" height="32">
<tr>
<td>
<div align="right"><img src="images/navbar.gif" width="360" height="30" usemap="#nav" border="0"><map name="nav"><area shape="rect" coords="19,9,118,28" href="index.htm" alt="Home" title="Home"><area shape="rect" coords="125,11,341,28" href="pform.htm" alt="printout form " title="printout form "></map></div>
</td>
</tr>
</table>
<table width="96%" border="0" height="244" cellspacing="4">
<tr>
<td width="78%" bgcolor="#FFFFCC" height="264" valign="top">
<p><font face="Arial, Helvetica, sans-serif" size="2">You can publish any
greeting or event!</font></p>
<font face="Arial, Helvetica, sans-serif" size="2"><b>Birthdays, </b></font><font face="Arial, Helvetica, sans-serif" size="2"><b>Weddings</b></font><b><font size="2">,
<font face="Arial, Helvetica, sans-serif">Anniversaries</font>, <font face="Arial, Helvetica, sans-serif">Graduations</font>,
<font face="Arial, Helvetica, sans-serif">Birth Announcements</font>,
<font face="Arial, Helvetica, sans-serif">Holiday Wishes</font>,</font></b>


<font size="2"> <font face="Arial, Helvetica, sans-serif"><b>Get-togethers</b></font><b>!!!
</b> </font>
<p><font face="Arial, Helvetica, sans-serif" size="2">Publish all your messages
and photos anytime. Share all those special moments with family and friends
around the world from one place. Onlinegreet.com is the place to spread
the word. Go Online.</font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2"><b>Here is how you
can do this:</b></font></p>
<p><font face="Arial, Helvetica, sans-serif" size="2">Print the submission
form and mail your message and/or photos or fill out online submission
form. </font></p>
</td>
<td width="22%" bgcolor="#99CCCC" height="264" valign="top">
<p><font face="Arial, Helvetica, sans-serif" size="2">You can search for
a message by name or by events </font></p>
<CENTER>
<FORM NAME="form1" action="http://www.activitypost.com/cgi-bin/db.cgi" method="get">
<font face="Arial, Helvetica, sans-serif" size="2">
<input type="hidden" name="db" value="default">
<input type="hidden" name="uid" value="default">
<b>Events</b>
<select name="select1" onChange="surfto1(this.form)" size=1>
<option value="http://www.activitypost.com/cgi-bin/dbman/db.cgi?db=mydb&uid=default&view_records=1&Category=Birthdays">Birthdays </option>
<option value="http://www.activitypost.com/cgi-bin/dbman/db.cgi?&uid=default&db=default">Weddings </option>
<option value="http://www.activitypost.com/cgi-bin/dbman/db.cgi?db=default&uid=&ID=&Name=&Date=&Category=Anniversaries&Message=&keyword=&mh=10&sb=---&so=ascend&view_records=View+Records">Anniversaries </option>
<option value="http://www.activitypost.com/cgi-bin/dbman/db.cgi?db=mydb&uid=default=&ID=&Name=&Date=&Category=Birth+Announcements&Message=&keyword=&mh=10&sb=---&so=ascend&view_records=View+Records">Birth Announcements </option>
<option value="nutra.html">Holiday Wishes </option>
<option value="nutra.html">Get-Togethers </option>
<option value="nutra.html">Matters of the Heart </option>
<option value="0"> </option>
</select></form>
</font><p>
<CENTER><form action="http://www.activitypost.com/cgi-bin/db.cgi method="get" name="form2">
<font face="Arial, Helvetica, sans-serif" size="2">
<input type="hidden" name="db" value="default">
<input type="hidden" name="uid" value="default">
<b>Search by name</b>
<CENTER>
<font face="Arial, Helvetica, sans-serif" size="1">Last name
first.
Example: Hayes, John
OR
Only the Last name
Example: Hayes </font>
</CENTER>
<input type="text" name="search" size="35">

<input type="submit" value="submit">


</CENTER>
</form></CENTER>
</td>
</tr>
</table>
<hr align="center" id="#99CCCC" noshade>
<p align="right"><font face="Arial, Helvetica, sans-serif" color="#CCCC99"><b><img src="images/logo.gif" width="118" height="25" usemap="#Map" border="0"><map name="Map"><area shape="rect" coords="6,2,115,21" href="http://www.activitypost.com/cgi-bin/dbman/db.cgi"></map></b></font></p>
<p> </p>
<p> </p>
</body>
</html>


Within the option tags, what am I suppose to put in there?
Do you notice anything I may be doing wrong.
I appreciate your effort.
P.s. from the preview, I noticed my javascript disappear, although I copied everything. I hope this won't be a problem.

Always on a mission!!
Quote Reply
Re: Search links in html form In reply to
In Reply To:
Within the option tags, what am I suppose to put in there?
Yuck! I will need more time to de-bug your codes...they are very messy.

Regards,

Eliot Lee

Quote Reply
Re: Search links in html form In reply to
If it helps; here is that javascript code that did not show in the previous post.

<head>
<title>Onlinegreet.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">

</SCRIPT>
</head>

it automatically send me to a link without a submit button.
My problem is knowing the url I am suppose to use within the <option> tags.
Desire output: Visitors make a selection. Example: They choose "birthday" from the menu list. Visitor then can see a "list all" of all the birthdays. I hope this is much clearer.
Thxs.

Always on a mission!!
Quote Reply
Re: Search links in html form In reply to
I was just thinking. They way the script works I will need a link for each section.
Example: when I select birthday from menu list, it should take me to the birthday page with a "list all" of all the birthdays. When I select wedding, the link will take me to the wedding page with a "list all" of all the weddings and so on.
Question would I have to make up a separate page for each category using using the user-friendly html.pl mod that Jpeni created?


Always on a mission!!