Gossamer Forum
Home : Products : DBMan : Customization :

Does Dbman support Cgi call methods

Quote Reply
Does Dbman support Cgi call methods
Here is my problem. I have a shopping cart that I want to tie into Dbman. The shopping cart can only be accessed though a form with some hidden fields. Is this possible?

Quote Reply
Re: Does Dbman support Cgi call methods In reply to
I can't recall the exact threads, but have you searched using "shopping" and "shopping cart" to see what you could find?

I'm pretty sure I remember a thread that asked the same question and the solution may be available.

I hope you can find it Smile

Quote Reply
Re: Does Dbman support Cgi call methods In reply to
You can have hidden fields in the form in DBMan.

JPD
Quote Reply
Re: Does Dbman support Cgi call methods In reply to
Could someone point me in the right direction. Maybe how the code looks with a hidden field? Any starting point would help since I can't find a mod with hidden fields.

Quote Reply
Re: Does Dbman support Cgi call methods In reply to
There are hidden fields all over the place in the html.pl file.

Code:
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
for example.

If you tell us what you need, we can help.

JPD
Quote Reply
Re: Does Dbman support Cgi call methods In reply to
I have this problem as well. How do you get the shopping cart info into dbman? Are you suggesting you can take input data from a single form and share it across two cgi programs? Please point me to any examples of code please.

Quote Reply
Re: Does Dbman support Cgi call methods In reply to
Here is my current form.

</FORM>
<FORM METHOD="POST" ACTION="https://secure.host.com/cgi-win/ccprod/iprod.exe"
ENCTYPE="x-www-form-urlencoded">
<INPUT TYPE="hidden" NAME="reqtype" VALUE="add2cart">
<INPUT TYPE="hidden" NAME="account" VALUE="43531-7200">
<INPUT TYPE="hidden" NAME="catnum" VALUE="feo1-00">
<INPUT TYPE="hidden" NAME="return" VALUE="http://www.mysite.com/">
<OPTION VALUE="10 ft." SELECTED>6 ft.
<OPTION VALUE="20 ft. ">8 ft.
</SELECT> <SELECT NAME="color">
<OPTION VALUE="Ivory" SELECTED>Ivory
<OPTION VALUE="Brown ">Brown
<OPTION VALUE="Black">Black</SELECT>
<INPUT TYPE="text" NAME="qty" SIZE="1" MAXLENGTH="2" VALUE="1">
<INPUT TYPE="submit" BORDER="0" VALUE="Add"></FORM>



I hope that helps.

Quote Reply
Re: Does Dbman support Cgi call methods In reply to
I still don't know what you want to do.


JPD
Quote Reply
Re: Does Dbman support Cgi call methods In reply to
Do you just want to pass values for fields in DBMAN to your shopping cart program??? Are the fields you have in the default.cfg file the same that you have in your shopping cart config file?

Regards,



Eliot Lee
Quote Reply
Re: Does Dbman support Cgi call methods In reply to
Sorry if I'm breaking protocal, but I have a similar problem to aaron5. Would like to pass values from shopping cart into dbman.

Quote Reply
Re: Does Dbman support Cgi call methods In reply to
I cannot help anyone unless they are willing to go into more detail than either one of you has been willing to post here so far.

What information do you need to pass to what script? I am completely unclear about whether you are passing info from your shopping cart to DBMan or from DBMan to your shopping cart, for one thing.

JPD
Quote Reply
Re: Does Dbman support Cgi call methods In reply to
I would like to pass info from shopping cart to dbman. In shopping cart, user enters name, address, phone number, email and credit card info. Once this info is submitted and sent to a log file, user is taken to dbman to create userid and get secure password. Then they can access database. Would like to pass first and last name and email address automatically into dbman when their first record is created,
preferably, it would be as soon as they create their userid.
I have already modified dbman to do this. That way when user logs on for the first time, all they're really doing is modifying this automatically created record.

Here is link to online prototype
https://web9.tdl.com/~hsf/football/registration_form.htm

Thanks

Quote Reply
Re: Does Dbman support Cgi call methods In reply to
Okay, now I got it! Smile

A lot depends on your shopping cart program, though. Different scripts use different variables to deal with the values from forms.

For example, in DBMan, if you have a field like

<input type="text" name="Name">

and you fill in Fred Flinstone in the field, after you click the submit button, the script parses the form into a hash in the form of

$in{'Name'} = "Fred Flinstone"

You can then use the variable $in{'Name'} whenever you want to refer to the value of the field.

Other scripts use different variable names for their hashes. I have seen things like $FORM{'Name'}, for example (and others I can't think of right now).

What you need to do is to look at your shopping cart script and find out what the name of the hash is that it uses. For my example, I'll assume that the shopping cart script uses a %FORM hash.

Then, when your shopping cart finishes doing its thing, you can add

print "Location: http://www.server.com/cgi-bin/dbman/db.cgi?db=DatabaseName&signup_form=1&FirstName=$FORM{'FirstName'}&LastName=$FORM{'LastName'}&EmailAddress=$FORM{'EmailAddress'}\n\n"

As Eliot said earlier, your form for your shopping cart should use the same form field names as the database names you want to pass to DBMan.

That will pass the information to DBMan and take you to the signup form. I'm not sure that's where you want to go, though.

JPD
Quote Reply
Re: Does Dbman support Cgi call methods In reply to
I just want to publicly declare how wonderful JPDeni is.
Yes, it works! This opens up a whole new world of possibilities.
Thank you for giving of your time and talents so unselfishly.

Quote Reply
Re: Does Dbman support Cgi call methods In reply to
Aw, gee. Smile

I'm glad I could help.


JPD
Quote Reply
Re: Does Dbman support Cgi call methods In reply to
I agree.

Btw, I got it working. Thanks