Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Problem with CGI.pm generated forms

by Hero Zzyzzx (Curate)
on Aug 14, 2002 at 01:21 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://189964]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found