Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Web form to alter files is writing to file before submit button is pressed.

by tangent (Priest)
on Mar 10, 2012 at 17:46 UTC ( #958888=note: print w/replies, xml ) Need Help??


in reply to Web form to alter files is writing to file before submit button is pressed.

If you change the line
line(5,q(<input type="submit" value="Make changes">));
to:
line(5,q(<input type="submit" name="make_changes" value="Make changes" +>));
then you can check if the button was clicked:
if ( $cgi->param("make_changes") ) ...

Replies are listed 'Best First'.
Re^2: Web form to alter files is writing to file before submit button is pressed.
by Lady_Aleena (Curate) on Mar 11, 2012 at 19:13 UTC

    I made this change, and it made a big difference. Thank you tangent for the help.

    Have a cookie and a very nice day!
    Lady Aleena

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://958888]
help
Chatterbox?
NodeReaper settles into the armchair by the fire. You weren't using it were you?

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2017-11-24 01:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (343 votes). Check out past polls.

    Notices?