minixman has asked for the wisdom of the Perl Monks concerning the following question:
I seem to have a problem with using CGI, when i run the following code.
So the user selected an option from an HTML drop down list, this list information is forward to the program, which then displays that pages that the user asks for, by running the following routine
But when the this page is displayed by my prog,
sub displayreg() { print $q->start_form; print "<b>Please enter the details below to register a new user </b>" print "<EM>Users Username from </EM>"; print $q->textfield('username') +; print $q->submit(-name=>'Action',-value=>'Submit',-onClick=>®isteru +ser()); print $q->reset; print $q->endform; print "<BR>"; }
So when i create another routine down the page to enter the details into a textfile on the system or email it, it does not work
sub registeruser() { printf ("The username you entered was $q->param('username')); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI submit running sub routine
by herveus (Prior) on Sep 01, 2004 at 14:11 UTC | |
|
Re: CGI submit running sub routine
by Grygonos (Chaplain) on Sep 01, 2004 at 14:33 UTC | |
|
Re: CGI submit running sub routine
by MCS (Monk) on Sep 01, 2004 at 15:55 UTC | |
|
Re: CGI submit running sub routine
by muntfish (Chaplain) on Sep 01, 2004 at 14:17 UTC |