Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: form buttons

by Anonymous Monk
on Nov 30, 2001 at 15:12 UTC ( #128599=note: print w/replies, xml ) Need Help??


in reply to form buttons

Give all the buttons the same name but different values.
<input type="submit" name="action" value="button1"> <input type="submit" name="action" value="button2"> <input type="submit" name="action" value="button3">
Then in your CGI the action parameter will be 'button1' or 'button2' or 'button3' depending on which is pressed.
my $query = CGI::new(); #assign value to $action my $action = $query->param('action');
you can then say
if ($action eq 'button1') { #do your thing }elsif ($action eq 'button2'){ #do another thing }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://128599]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2022-08-16 00:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?