GordonLim has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I new in Perl CGI. Now I am facing a problem when I fetch my username and password from previous page to existing page, my form data will be not function. Form Data only function when the script is on the top and same to scalar it also only function if the script is on the top of the page. Script as below:
#!/usr/bin/perl use CGI; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use CGI::Pretty qw(:all); my $username = param('username'); my $password = param('password'); read(STDIN, $buffer,$ENV{'CONTENT_LENGTH'}); $buffer =~ tr/+/ /; $buffer =~ s/\r/ /g; $buffer =~ s/\n/ /g; @pairs = split(/&/,$buffer); foreach $pair(@pairs){ ($key,$value)=split(/=/,$pair); $formdata{$key}.="$value"; } #delete file $version=$formdata{'version'}; $Chassis=$formdata{'Chassis'}; $Assigned=$formdata{'Assigned'};.....
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Any idea to let Perl form data and scalar work in same page?
by tobyink (Canon) on Mar 19, 2013 at 14:53 UTC | |
by GordonLim (Acolyte) on Mar 20, 2013 at 17:35 UTC | |
Re: Any idea to let Perl form data and scalar work in same page?
by mithaldu (Monk) on Mar 19, 2013 at 14:23 UTC | |
by Anonymous Monk on Mar 19, 2013 at 14:29 UTC | |
by tobyink (Canon) on Mar 19, 2013 at 14:57 UTC | |
by Anonymous Monk on Mar 19, 2013 at 16:04 UTC | |
by GordonLim (Acolyte) on Mar 19, 2013 at 16:01 UTC | |
Re: Any idea to let Perl form data and scalar work in same page?
by Anonymous Monk on Mar 19, 2013 at 14:36 UTC |
Back to
Seekers of Perl Wisdom