Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: cgi check button

by thomas895 (Deacon)
on Apr 26, 2015 at 23:40 UTC ( [id://1124811]=note: print w/replies, xml ) Need Help??


in reply to Re^2: cgi check button
in thread cgi check button

i want to disallow auto code execution
You're still being unclear.
Do you mean you want to force people to use only your form in a browser only (and prevent, say, the use of LWP etc.)? If so, give up all hope, since people will find a way to automate your form anyway.

Or do you mean that you want to know whether or not the submit button was pressed? If so, then you're halfway there. You have:
<input type=submit name="make ponies appear" value="Submit button label">
In your script, you would do:

my $q = new CGI; if($q->param("make ponies appear")) { # do something with the form data } else { # show the form or something else }

Or do you want something else? You'll need to be more specific.

-Thomas
"Excuse me for butting in, but I'm interrupt-driven..."

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-28 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found