> In a reentrant Perl CGI script that outputs an HTML FORM, I'd like to have
> multiple submit buttons with different labels, but I'd need to know which
> button was clicked on when reentering.

Assign a 'value' field to each button, then read the value of the parameter
that was submitted:

HTML:
...  form start ...
<input type="submit" value="Button 1" name="button">
<input type="submit" value="Button 2" name="button">
... end form ...


PERL:
use CGI;
$q = new CGI;
$which_button = $q->param('button');

if ($which_button eq "Button 1") {
    ...
} else {
   ....
}

-Matt

_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to