pass value(variable) to the third page of web???

 
Post new topic   Reply to topic    Aprelium Forum Index -> Perl
View previous topic :: View next topic  
Author Message
Fr4nk13
-


Joined: 16 Jul 2007
Posts: 4
Location: INDONESIA - BANDUNG

PostPosted: Mon Jul 16, 2007 10:46 am    Post subject: pass value(variable) to the third page of web??? Reply with quote

i have a problem to pass username login to the 3rd page after checklogin.pl :
this is the part of the checklogin.pl script (to read login.pl):
...
...
foreach $pair (@pairs)
{
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/~!/ ~!/g;

$FORM{$name} = $value;
if ($value =~ /\<\!--\#(.*)\s+(.*)\s?=\s?(.*)--\>/) { &kill_input; }
if ($value =~ /[;><\*`\|]/) { &kill_input; }
}

open (FN,"checking.cfg");
@usercheck= <FN>;
close FN;
chomp (@usercheck);

foreach (@usercheck) {
if ($_ !~ /^#|^ |^\;/ ) {
($username,$password) = split (",",$_);
chomp ($username);
chomp ($password);

if ($FORM{'username'} eq $username && $FORM{'password'} eq $password) {
if ($username eq "Admin") {
...
...
print "<FRAMESET ROWS=31%,*>\n";
print "<FRAMESET COLS=55%,*>\n";
print "<FRAME NAME=leftpage SRC=left.pl?username=$username >\n";
print "<FRAME NAME=righpage SRC =linkpage.pl >\n";
print "</FRAMESET>\n";
print "<FRAME NAME=OUTPUT SRC=out.pl>\n";
print "</FRAMESET>\n";
...
...

THEN:
and the third page, i want to use the username for left.pl , the page contain TABLE with VALUE is the username, but when i try, the VALUE IS BLANK, maybe i miss or wrong to write something.

? thanks, hope u reply (sorry for bad english) ?

[/b]
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Mon Jul 16, 2007 10:03 pm    Post subject: Re: pass value(variable) to the third page of web??? Reply with quote

Fr4nk13,

Check the HTML source code of the generated page and try setting some debugging instructions to verify to what value $username is set during the execution.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Fr4nk13
-


Joined: 16 Jul 2007
Posts: 4
Location: INDONESIA - BANDUNG

PostPosted: Tue Jul 17, 2007 2:37 am    Post subject: Reply with quote

i have tried to see the source code from the html, but still blank, i'm still confuse about this:
print "<FRAME NAME=leftpage SRC=left.pl?username=$username >\n";
in the 3rd page, should i write $username or others, and should i use read form like the 2nd page like this:

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);

foreach $pair (@pairs)
{
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/~!/ ~!/g;
$FORM{$name} = $value;
if ($value =~ /\<\!--\#(.*)\s+(.*)\s?=\s?(.*)--\>/) { &kill_input; }
if ($value =~ /[;><\*`\|]/) { &kill_input; }
}

or if you have any suggestion, i'm very thankful (i'm still beginner whit this)
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Jul 17, 2007 9:56 pm    Post subject: Reply with quote

Fr4nk13,

If the code of the HTML page is blank, then there is a problem at another level. May be your script is not even being executed. In that case, start by understanding why your script is not running correctly.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
diamondblast
-


Joined: 03 Aug 2008
Posts: 3

PostPosted: Sun Aug 17, 2008 12:05 am    Post subject: Reply with quote

aprelium wrote:
Fr4nk13,

If the code of the HTML page is blank, then there is a problem at another level. May be your script is not even being executed. In that case, start by understanding why your script is not running correctly.


Do you run anything else in the background ?
From my humble experience it may be a clash of two scripts or more.
This kind of illimination process .... try to minimize anything possible.
Try to give a visit at saturated fat and here production model
Good Luck.
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Perl All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group