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?
Jun 7, 2000, 9:24 AM
Veteran / Moderator (3034 posts)
Jun 7, 2000, 9:24 AM
Post #2 of 16
Views: 6072
Jun 8, 2000, 12:13 PM
Veteran / Moderator (8669 posts)
Jun 8, 2000, 12:13 PM
Post #5 of 16
Views: 6087
Jun 8, 2000, 1:44 PM
Novice (6 posts)
Jun 8, 2000, 1:44 PM
Post #7 of 16
Views: 6060
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.
</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.
Jun 8, 2000, 11:55 PM
Veteran / Moderator (8669 posts)
Jun 8, 2000, 11:55 PM
Post #11 of 16
Views: 6252
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
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
Jun 9, 2000, 12:07 AM
Novice (9 posts)
Jun 9, 2000, 12:07 AM
Post #12 of 16
Views: 6142
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
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
Jun 9, 2000, 2:09 AM
Veteran / Moderator (8669 posts)
Jun 9, 2000, 2:09 AM
Post #13 of 16
Views: 6055
Okay, now I got it!
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
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