Gossamer Forum
Home : Products : DBMan : Customization :

Searching from a HTML page

Quote Reply
Searching from a HTML page
Hello
I noticed a problem with creating a html page that people can search from before they logon to the DBMAN program. DBMAN requires the user to be assigned a number and if you do a search from the html page I created it take you to the first screen you would get if you logged on to my database and if you hit back and search again it takes you to the results page. I tried turning of the loging but still doesn't work. Is there any way to create the use log number from the for so the user goest to the results page instead of the mail login page?

Thanks
Quote Reply
Re: Searching from a HTML page In reply to
If you want to do a search from a static html page, you have to allow default users to view the database and you have to include either

&uid=default

if you're using a link, or

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

if you're using a form.


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





Quote Reply
Re: Searching from a HTML page In reply to
I'm using a userid and password and a database selected by check boxes. then the user just enters the keywords. Is it possible to do it the way i'm doing it. I mean send them to the results without using default.

They have a valid userid and password and it logs them in but for some strange reason it doesn't assign a log user # so the user has to press page back then submit the search again and it works.

Thanks
Quote Reply
Re: Searching from a HTML page In reply to
I don't understand what you're doing, then. I thought I did, but I obviously don't. To quote from a movie, "Explain it to me like I was a 6-year-old." Smile


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





Quote Reply
Re: Searching from a HTML page In reply to
Ok I have a html page I created. Listed Below
the user types in the keyword and hits enter. what happens is the user is brought to the main menu instead of the results of the search. if the user presses the back button and hit the same search in again it takes them to the search results from the database.

DBMAN has to create the auth # for userid12. It looks like this custid12.93414235968283

I need DBMAN to bring them to the results the first time they do the search. So somehow I need to ge the auth # to create right away so it will take the user to the results of their search and not the main menu.

<form
action="http://Server/cgi/cars/db.cgi"
method="get">
<input type="hidden" name="userid" value="custid12">
<input type="hidden" name="pw" value="custid12">
<input type="hidden" name="login" value="1">
tr>
<td width="10"><font color="#FF0000"></font> </td>
<td><font color="#FF0000" size="4" face="Arial"><input
type="radio" name="db" value="Ford"></font><font
color="#FF0000" size="3" face="Arial">Ford</font></td>
<td><font color="#FF0000" size="4" face="Arial"><input
type="radio" name="db" value="GM"></font><font
color="#FF0000" size="3" face="Arial">GM</font></td>
</tr>
<tr>
<td> </td>
<td align="center" colspan="2"><font color="#000000"
size="3" face="Arial">Enter Keywords:</font></td>
</tr>
<tr>
<td width="10"> </td>
<td colspan="4"><p align="center"><input type="text"
size="15" maxlength="255" name="keyword"> <input
type="submit" name="view_records" value="Search"> <input
type="reset" value="Reset"><br>
</p>
</td>
</tr>
</table>
</center></div>
</form>
Quote Reply
Re: Searching from a HTML page In reply to
So what you want to do, in effect, is have them login and search at the same time, right?

I'm not sure what the advantage is of having a userid and password in the search form. Seems to me it would be just as easy to have a default user. But you must have a reason, so I'll assume it's a good one. Smile

What you can do is add the following to the beginning of sub html_home

Code:
if ($in{'keyword'}) {
&view_records;
return;
}

You probably don't want to have

<input type="submit" name="view_records" value="Search">

as your submit button. It would be better to have just

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


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





Quote Reply
Re: Searching from a HTML page In reply to
Boy JPDeni you are good. It worked.

Thanks again.
Quote Reply
Re: Searching from a HTML page In reply to
That's what my hubby keeps telling me!! Wink

Glad I could help.


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