in reply to Re: Serving an html page
in thread Serving an html page
Any ideas on what I am doing wrong?my $q = new CGI; print $q->redirect("http://busybody.w1.com/html/2010assignment.html");
#!/usr/local/bin/perl -w # 2010b.pl use CGI; require ("cgi-lib.pl"); my $q = CGI->new(); print $q->header(); $studentid = $q->param('studentid'); $password = $q->param('password'); $CSC = $q->param('CSC'); $assignment = $q->param('assignment'); $file = $q->param('path'); if ($CSC eq "CSC2010") { $openfile = "CSC2010.txt"; open (IN, "<$openfile") or die "Can't open $openfile\n"; $foundusername = false; $foundpassword = false; while ($line = <IN>) { chomp($line); my ($realstudentid,$realpassword) = split /\|/, $line; if ($realstudentid eq $studentid){ $foundusername = true; if ($realpassword eq $password){ $foundpassword = true; print $q->redirect("http://busybody.w1.com/html/2010assignmen +t.html\n\n"); exit; } } } if ($foundusername eq false ) { print "username not found!<br>"; } if ($foundpassword eq false) { print "bad password!<br>"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Serving an html page
by IlyaM (Parson) on Dec 01, 2001 at 03:26 UTC |