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

ok let me make it clear

i want to disallow auto code execution

thats why i asked if there any way i can do it. with submit button and make it manuel execution. because i have post and get in my script once the page reloads the script sends requst immediately to server. thats why i want to control that auto execution with submit button

thats why i made simple html form! sorry i missed to put form tag. bt its example.

Replies are listed 'Best First'.
Re^3: cgi check button
by marinersk (Priest) on Apr 24, 2015 at 13:41 UTC

    I'm sorry, bigup401, we're just not connecting here.

         i want to disallow auto code execution

    I realize you probably think this is clear -- but it is not. It begs many questions, some of which are:

    1. What code are you trying to prevent execution of?
      • Perl CGI code from the server?
      • JavaScript code on the page?
      • JavaScript or other code entered into the form by the end user?
      • Some other kind of code?
    2. At what point are you trying to prevent this code execution?
      • Before the web page is fully displayed?
      • After the web page is displayed but before the user starts typing?
      • After the user starts typing but before they click the button? (This seems the likely answer but nothing is clear here)
      • Some other point in the user's experience?

    I wasn't kidding when I said to be slow, careful, detailed, and thorough. We are missing on more points than we are connecting on.

    Slow down, breathe deeply, maybe have a cup of hot cocoa. Then, relax, and try to explain the process you are expecting to see, and what you are trying to affect.

Re^3: cgi check button
by thomas895 (Deacon) on Apr 26, 2015 at 23:40 UTC

    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..."