Click to See Complete Forum and Search --> : how do i store the value entered on a web page to a variable


gemstone
07-13-2007, 04:10 AM
how can i accept 2 different values (one entered in the login box and the other in the password box) and store them in 2 variables, say $var1 and $var2. pls help
:(

Nedals
07-19-2007, 09:32 PM
use strict; # always include this in your Perl scripts
use warnings;
use CGI; #a standard module used with .cgi scripts

my $q = CGI->new(); # creates a cgi object

my $username = $q->param('username');
my $password = $q->param('password');
# Where username and password are the names of your HTML <input> fields
# Don't use $var1 and $var2 as variable names. Use descriptive names