Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Problem with CGI.pm generated forms

by Hero Zzyzzx (Curate)
on Aug 14, 2002 at 01:21 UTC ( #189964=note: print w/replies, xml ) Need Help??


in reply to Problem with CGI.pm generated forms

Mayhap you should check out the "-override" option? By default, form values are sticky, and you need to set them explicitly how jeffa did above, or by passing them to your method and setting "-override" to a true value.

#!/usr/bin/perl + use CGI qw(:standard); use strict; my $num = param('number') || 0; print header, start_html; print "Your number is $num."; print start_form; print hidden(-name=>'number', -value=>$num + 1,-override=>1); print submit('Get next number'); print end_form; print end_html;

-Any sufficiently advanced technology is
indistinguishable from doubletalk.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2021-05-17 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (165 votes). Check out past polls.

    Notices?