Gossamer Forum
Home : Products : DBMan : Customization :

Perl Logic in db.cgi

Quote Reply
Perl Logic in db.cgi
I would appreciate some assistance with perl logic in dbman concering the following:
I want to capture a flag from a-non dbman html page -- let's say it's called short.
I want to pass this to dbman and have it encoded in the database so that I can retrieve it for later use.
Here's the code to date but not sure why it's not working:
In db.cgi:
# Load the form information and set the config file and userid.
local(%in) = &parse_form;
$in{'db'} ? ($db_setup = $in{'db'}) : ($db_setup = 'default');
$in{'uid'} ? ($db_uid = $in{'uid'}): ($db_uid = '');
$in{'short'} ? ($db_acct = $in{'short'}): ($db_acct = '');
.
.
.
In the Add a Record sub in db.cgi
# Set the userid to the logged in user.
($auth_user_field >= 0) and ($in{$db_cols[$auth_user_field]} = $db_userid);
$in{$db_cols[$auth_db_acct]} = $db_acct;

Note that in my cfg file I have set up $auth_db_acct = to the column in my database where I want the flag to be stored.

What do I need to do to get the item written into the database for later retrieval?
Quote Reply
Re: Perl Logic in db.cgi In reply to
My guess is that you would add it to the database when you add a new record. Since I'm not sure what this is for, nor how you plan to use it, I can't get any more specific than that.

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