Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Help... I know nothing about perl...

by Eureka_sg (Monk)
on May 01, 2001 at 21:24 UTC ( [id://77037]=note: print w/replies, xml ) Need Help??


in reply to Re: Help... I know nothing about perl...
in thread Help... I know nothing about perl...

When you are using CGI in OO form,you should use CGI; and not use CGI qw(:standard);.

I recommend that you just import the functions in and use them

#!/usr/bin/perl use CGI qw(:standard); use strict; my $name = param('name'); print header(); if ($name) { print "Welcome " . $name }

Replies are listed 'Best First'.
Re: Re: Re: Help... I know nothing about perl...
by Roninpc (Initiate) on May 01, 2001 at 21:59 UTC
    Thanks, OK, so do I place the function in my current form handeler? (I am embarrassed that I am asking for help and do not even know where to start).

      No, it replaces your current form handler. Of course you'll need to expand it to output more of a document.

      #!/usr/bin/perl use CGI; my $q = new CGI; print $q->header; # HTTP header # Note: the $name and 'name' equivalence is arbitrary. my $name = $q->param('name') || "Anonymous"; print <<ENDOFPAGE; <html><head><title>Thank you, $name!</title></head><body> <p>$name, I want to personally thank you for making world peace possible!</p> <p>$name, if you print this page, and glue it onto your forehead, you'll never need to pay for anything again! You'll even get a free shirt with long sleeves and a ride to a big building where they'll put you in a comfy room with padded walls!</p> </body></html> ENDOFPAGE # That ENDOFPAGE must be on its own line!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-03-28 18:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found