CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Use of CGI

 



naven8
Novice

Mar 16, 2012, 11:48 PM

Post #1 of 3 (974 views)
Use of CGI Can't Post

Can anyone explain me on how to use CGI and what is the use of CGI?

Thanks in advance.


wickedxter
User

Mar 17, 2012, 3:23 PM

Post #2 of 3 (954 views)
Re: [naven8] Use of CGI [In reply to] Can't Post

to use the CGI module your talking about...


Code
use strict; 
use warnings;
use CGI; #delcare in the top of your script


if your useing forms with the script just point the form to the script location


Code
<form action="./login.pl?login" method="post"> 
</form>


then in your script you need to write some URL matching locations .

Code
 
my $cgi = new CGI;

if($cgi->param('login')){
#do something with the form data posted to login.pl?login
}


form data is accessed using the param method param('username');

look here for more info.....
http://perldoc.perl.org/CGI.html


(This post was edited by wickedxter on Mar 17, 2012, 3:24 PM)


naven8
Novice

Mar 17, 2012, 9:43 PM

Post #3 of 3 (943 views)
Re: [wickedxter] Use of CGI [In reply to] Can't Post

Hi wickedxter,
Can you give me some example on where we use this?
To create/read/write HTML pages?
Anything special about it?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives