Closed Thread Icon

Preserved Topic: CGI for Dummies.... Pages that link to <a href="https://ozoneasylum.com/backlink?for=21080" title="Pages that link to Preserved Topic: CGI for Dummies...." rel="nofollow" >Preserved Topic: CGI for Dummies....\

 
Author Thread
Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 11-26-2001 04:32

ok..... I give in....

How does that CGI module work?

tskull@hotmail.com">
"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 11-26-2001 14:59

I assume you mean the CGI module for Perl.

It creates a Perl programming interface to the CGI interface of the server it is running on. The CGI module is really just an interface on top of an interface. The advantage of the CGI module is that it is easier to use than the actual interface to the server and the module automatically handles some of the varities of the Common Gateway Interface.




Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 11-26-2001 23:22

ok, I know what it *IS*.

What does it *DO*?
...and how do you get it to do that?


"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342


[This message has been edited by Petskull (edited 11-26-2001).]

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 11-26-2001 23:30

Same thing most Perl modules do. Makes life easier.

Here's a link

Basically it makes the processing of forms and the creation of HTML a bit easier.
It's a huge and quite detailed module so to tell you everything would take a while, check the link. It would be easier if you let us know what you are trying to do.



:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

[This message has been edited by bitdamaged (edited 11-26-2001).]

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 11-28-2001 07:16

I just want to use it to parse values from the standard input stream.
For example:
If I create a form with two input boxes:
name = 'Fire Hazard'
terrorist = 'Yes'

'Fire Hazard' & 'Yes' being the values inserted into the input boxes 'name' & 'terrorist', respectively.

How would I retrieve those values from the script? Are they inserted into any specific variables? If so, which ones?


tskull@hotmail.com">
"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

Piper
Paranoid (IV) Inmate

From: California
Insane since: Jun 2000

posted posted 11-28-2001 14:43

Hi Petskull,

Here is a quick example:

code:
#!/usr/bin/perl -w

use strict;
use CGI qw{ standard };

my $IN = new CGI;

my $name = $IN->param('name');
my $terrorist = $IN->param('terrorist');

print $IN->header();
print "Value of name: $name<br>";
print "Value of terrorist: $terrorist<br>";



That will give you a basic idea of how to get your form input into vars. It should work but I didn't test it.

Regards,
Charlie

« BackwardsOnwards »

Show Forum Drop Down Menu