#!C:\perl\bin\perl
use strict;
use CGI qw/:standard/;
use DBI;
my $q = new CGI;
my $dbh = DBI->connect("DBI:mysql:project", {PrintError =>0, RaiseError =>0}) ;
my $us=$q->param('user');
my $pas=$q->param('pass');
my $sth = $dbh->prepare("SELECT * FROM user WHERE uname=? AND pass=PASSWORD(?)");
$sth->execute($us,$pas);
my ($valid_user, $pp) = $sth->fetchrow_array();
if ($valid_user eq '')
{
print redirect('http://localhost/index.html');
}
print $q->header("text/html"),
$q->start_html(-title=>uc($q->param('REG')), -Background=>'EiffelTower.tif');
print "