Gossamer Forum
Home : Products : DBMan : Customization :

Auto Post Hidden Fields to External CGI

Quote Reply
Auto Post Hidden Fields to External CGI
Hello

Thank you for the best most informative and helpful site I've encountered ever.

Only 1 Real Problem in 9 months of DBman use. I cannot find the answer anywhere. Seems this should be able to be done with simple code. I am not a genius obviously.

I would like to keep hidden form fields (in html_record_form) hidden. Really. I need to post the form data that the user inputs, along with the hidden fields to a merchant processor for credit card validation, at which point the validated info is returned back to db.cgi. We have security issues that really do require the hidden fields remain hidden, posting back to add_record is not a problem but I am missing a line of code or two to ship it out.

I was thinking, use part of add_record as sub pay_form (below, partial), at the point where

$status = &validate_record

would come in I would like to post the info, not to validate record but to pay.dll on the authorization server. This would be a default user, no auth at this point.

Sort of like this:

sub pay_form {
# --------------------------------------------------------
# Send payer to pay dll with his info plus required hidden fields.

my ($output, $status, $counter);
# Set the userid to the logged in user.
($auth_user_field >= 0) and ($in{$db_cols[$auth_user_field]} = $db_userid);

# Right here add requireds then link and send to pay dll.
$in{'Account'} = Mynumber123;#hidden fields added here
$in{'Date'} = &get_date;
$status = &validate_record; #<remove that then code link to pay dll ($pay_dll_url) here instead of validate. Upon return relay post to sub add-record as an original post for final validation.
}

I am a dummy. I have learned most of the perl by using dbman among others. No time for school here, the rent is always due!

Your suggestions appreciated. Maybe as simple as print location? but where would it go and how exactly? Thought is should have action=Post somewhere but is this acceptable in the cgi? I was thinking also it would be OK to add the info straight thru to html_record if I could add a line after the final print| |; that would auto submit all, again to pay dll. I figure if it does auto submit it'll move quick enough so that the hiddens aren't really accessible by viewing code.

but you probably know more than I.

Also can't find how to shorten auto-generated passwords from 8 chars to 5 or 6.

Thank you.