Is it possible to pass hidden fields between sub routines. Example:
New sub: sub html_confirm
html_record has a hidden field named "confirm" and its value is "1".
I have made html_record into a form, so when I hit the submit button, it should pass this field to html_confirm,"| if ($confirm) {
print qq| <FORM METHOD=BLAH BLAH BLAH>" should work. Can't use $rec{''} because it is not a database field. $form{''} doesn't work either. I figure there is some formula to get this to come out right.
What I am doing is:
When someone searches and finds an item they want to buy, they click on the submit button. html_record has a statement that says for example:
| if ($confirm) {
print qq| <FORM METHOD=POST ACTION="http://myurl.com/cgi-bin/cart.cgi">|;
}
else {
print qq| <FORM METHOD=GET ACTION="http://myurl.com/cgi-bin/db.cgi?db=default&db_uid&html_confirm">|;
}
So the action should point to the new sub on the initial search. After they click the submit button, they are carried to the new sub which also uses &html_record. After all the fields have been passed, $confirm should be present, thereby making a new action pointing to the shopping cart script.
Tough one? Not for you guys!
THANKS FOR EVERYTHING!
I do try to help others when I can. It's just that I don't know a whole lot.
New sub: sub html_confirm
html_record has a hidden field named "confirm" and its value is "1".
I have made html_record into a form, so when I hit the submit button, it should pass this field to html_confirm,"| if ($confirm) {
print qq| <FORM METHOD=BLAH BLAH BLAH>" should work. Can't use $rec{''} because it is not a database field. $form{''} doesn't work either. I figure there is some formula to get this to come out right.
What I am doing is:
When someone searches and finds an item they want to buy, they click on the submit button. html_record has a statement that says for example:
| if ($confirm) {
print qq| <FORM METHOD=POST ACTION="http://myurl.com/cgi-bin/cart.cgi">|;
}
else {
print qq| <FORM METHOD=GET ACTION="http://myurl.com/cgi-bin/db.cgi?db=default&db_uid&html_confirm">|;
}
So the action should point to the new sub on the initial search. After they click the submit button, they are carried to the new sub which also uses &html_record. After all the fields have been passed, $confirm should be present, thereby making a new action pointing to the shopping cart script.
Tough one? Not for you guys!
THANKS FOR EVERYTHING!
I do try to help others when I can. It's just that I don't know a whole lot.

