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

Re: Making webpages from a single CGI

by mr_dont (Beadle)
on Oct 04, 2001 at 01:27 UTC ( [id://116574]=note: print w/replies, xml ) Need Help??


in reply to Making webpages from a single CGI

The most obvious advice i can give is to use the glorious perl CGI.pm module. This module comes with the standard distribution of perl and should be available on your machine...

To get at your variables, try something like:

#!/usr/bin/perl # Loads the CGI Module use CGI; # creates a new CGI object my $page = new CGI; # This will print a standard HTML header print $page->header; # Grab a named CGI parameter # CGI::pm automatically figures out # if it's sent by GET or POST my $value = $page->param('node'); # Then: print "<html><head><title>node is $value</title></head>\n"; print "<body> Hi, you are on the $value node!</body></html>\n";

There are many more features to this great module. Learn about this before you do any other CGI programming.

Replies are listed 'Best First'.
Re: Re: Making webpages from a single CGI
by Chris2323 (Initiate) on Oct 04, 2001 at 02:55 UTC
    ooops, line breaks would be nice

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-18 14:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found