View previous topic :: View next topic |
Author |
Message |
Fr4nk13 -
Joined: 16 Jul 2007 Posts: 4 Location: INDONESIA - BANDUNG
|
Posted: Mon Jul 16, 2007 10:46 am Post subject: pass value(variable) to the third page of web??? |
|
|
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 |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Mon Jul 16, 2007 10:03 pm Post subject: Re: pass value(variable) to the third page of web??? |
|
|
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 |
|
|
Fr4nk13 -
Joined: 16 Jul 2007 Posts: 4 Location: INDONESIA - BANDUNG
|
Posted: Tue Jul 17, 2007 2:37 am Post subject: |
|
|
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 |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Jul 17, 2007 9:56 pm Post subject: |
|
|
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 |
|
|
diamondblast -
Joined: 03 Aug 2008 Posts: 3
|
Posted: Sun Aug 17, 2008 12:05 am Post subject: |
|
|
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 |
|
|
|
|
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
|
|