CREATING A SUBMIT BUTTON

   print $query->submit(-name=>'button_name',
			-value=>'value');

	-or-

   print $query->submit('button_name','value');

submit will create the query submission button. Every form should have one of these.

Parameters:
  • The first argument (-name) is optional. You can give the button a name if you have several submission buttons in your form and you want to distinguish between them. The name will also be used as the user-visible label. Be aware that a few older browsers don't deal with this correctly and never send back a value from a button.

  • The second argument (-value) is also optional. This gives the button a value that will be passed to your script in the query string.

  • You can figure out which button was pressed by using different values for each one:

         $which_one = $query->param('button_name');
    

    JAVASCRIPTING: radio_group recognizes the -onClick parameter. See checkbox_group for further details.