<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="page">here</a>.</p>
<hr>
<address>Apache/2.2.3 (CentOS) Server at #hostname Port 80</address>
</body></html>
my problem similar to this
#!/usr/bin/perl
use strict;
use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use DBI;
my $q = new CGI;
if ($q->param("Login")) {
my $Password = param('Password');
if (!$Password) {
print "Please Enter the Password";
} else {
my $dbh = DBI->connect(
"dbi:SQLite:DEVICE.db",
"", "",
{
RaiseError => 1,
AutoCommit => 1
}
);
my $cookie = $q->cookie(-name => 'welcome', -value => 'name',
+ -expires=> '+1m');
my $sth = $dbh->prepare("select * from Settings where Password
+ = ?");
$sth->execute($Password);
if (my $pass = $sth->fetchrow_hashref) {
$page = 'wel.pl';
print $q->redirect(-location => $page, -cookie => $cookie)
+;
} else {
print "Invalid Password";
}
$dbh->disconnect;
}
}
print "Content-Type: text/html\n\n";
print <<END1;
<HTML>
<HEAD>
<TITLE> </TITLE>
</HEAD>
<body>
<form NAME="login" METHOD="POST">
<input type="hidden" name="submit" value="Submit">
<TABLE align="center" bgcolor=#B0C4DE>
<TR>
<TD> Enter The Password And Click Login</TD>
</TR>
<TR></TR>
<TR></TR>
<TR></TR>
<TR></TR>
<TR></TR>
<TR>
<TD><b>PASSWORD</b> :<input type="password" name="
+Password" size="20" maxlength="15" /></TD>
</TR>
<TR></TR>
<TR></TR>
<TR></TR>
<TR></TR>
<TR></TR>
<TR>
<TR>
<TD align="center" colspan="2">
<input type="submit" name="Login" value="Login
+">
<input type="reset" name="submit" value="Cance
+l">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
END1
|