Sure. Please see my code snippet below.
use CGI ':standard';
generate_form();
do_work();
sub generate_form {
print start_form;
print "ID# ", textfield('id');
print submit('Action', 'OK');
print end_form;
}
sub do_work {
if (param('Action') eq 'OK') {
# fetch record from database using id ...
print "Phone number ", textfield('phone');
} elsif (param('Action') eq 'Update') {
my $new_phone_num = param('phone');
# update database with newly acquired info ...
}
}
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Mike Williams
Sent: Thursday, January 17, 2008 3:44 PM
To: [email protected]
Subject: Re: [Boston.pm] cgi form question
On Jan 17, 2008 2:54 PM, Xiong, Bob <[EMAIL PROTECTED]> wrote:
>
> Here is my problem. I couldn't get the newly entered updated information
> from
> the fillable textfields using a construct like "$new_phone_num =
> param('phone')". Is this due to creating a nested form?
>
>
Hard to say what the problem is without seeing some code. Can you post a
snippet of code that does not work as expected?
Mike
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm
The information transmitted in this electronic communication is intended only
for the person or entity to whom it is addressed and may contain confidential
and/or privileged material. Any review, retransmission, dissemination or other
use of or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you received this
information in error, please contact the Compliance HelpLine at 800-856-1983 and
properly dispose of this information.
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm