in reply to Unwanted CGI "Submit" Parameter

Because the submit button is a form-element just like any other, and sometimes you'd like to do something depending on what value the submit button is set to.

It would be alot easier for us to help you if you'd care to explain why you don't want the submit parameter...

[ar0n]

Replies are listed 'Best First'.
(bbq) RE: (ar0n) RE: Unwanted CGI
by BBQ (Curate) on Oct 06, 2000 at 17:41 UTC
    Hmmm... that's not entirely true. There's a big difference in these two submit buttons:
    <input type=Submit value="This doesn't have a value"> <input type=Submit name=Submit value="This one has a value">
    In other words, if you don't provide a name, there is nothing to associate the value to. Am I missing out on something important or has everyone gone gaga? :) Also, on a side note, I'd drop cgi-lib.pl and start using CGI.pm with the compatibility mode. Ie:
    use CGI; CGI::ReadParse(*in);
    My R$0.02 (its less than two cents when you convert it to US$)

    #!/home/bbq/bin/perl
    # Trust no1!
      You are totally correct.. In my experience I generally don't see a submit input item with a name attribute unless the coder is interested in the value of the submit button..
      <input type='submit' name='submit' value='Next'> <input type='submit' name='submit' value='Previous'>
      Of course you can make it whatever name you want, but if you don't particularly care what submit button they hit, just don't provide a name attribute:
      <input type='submit' value='Save'>