Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ID detection with CGI

Status
Not open for further replies.

Kijori

Technical User
Jan 22, 2002
67
SG
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top