i want the login id to be displayed in on of the frames of a pre-created web page.
here's a snippet of my codes...
# path to a static web page
$testMenu = "/Apache/blah/test.htm";
# captures the id entered
$logID = $q->param('user_id');
# checks the id credibility and sends the user to a appropriate page
if ($logID eq $dataID) {
print "Location:URL_here\n\n";
# i'm trying to replace the navi frame with new info without affecting the default one
&guessWho($testMenu);
}
# the sub-routine
sub guessWho {
$file = $_;
open(FILE, "$file" || die;
seek FILE, 0, 0;
@temp = <FILE>;
close(FILE);
@contents;
foreach $line (@temp) {
$line =~s/UID/$logID/g;
push @contents, $line;
}
print $q->header(-target=>'contents');
$q->start_html();
$q->body(@contents);
$q->end_html();
}
this do not work. how do you make it work??? sorry... i'm very new to Perl and CGI. just picked them up 2 weeks ago.
here's a snippet of my codes...
# path to a static web page
$testMenu = "/Apache/blah/test.htm";
# captures the id entered
$logID = $q->param('user_id');
# checks the id credibility and sends the user to a appropriate page
if ($logID eq $dataID) {
print "Location:URL_here\n\n";
# i'm trying to replace the navi frame with new info without affecting the default one
&guessWho($testMenu);
}
# the sub-routine
sub guessWho {
$file = $_;
open(FILE, "$file" || die;
seek FILE, 0, 0;
@temp = <FILE>;
close(FILE);
@contents;
foreach $line (@temp) {
$line =~s/UID/$logID/g;
push @contents, $line;
}
print $q->header(-target=>'contents');
$q->start_html();
$q->body(@contents);
$q->end_html();
}
this do not work. how do you make it work??? sorry... i'm very new to Perl and CGI. just picked them up 2 weeks ago.