Code: Select all
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<? // First part of script time script ?>
<?PHP include("includes/exetime1.php"); ?>
<?PHP include("template/textcolour.php"); ?>
<body bgcolor="<?php echo $bgcolor ?>" text="<?php echo $text ?>" link="<?php echo $link ?>" vlink="<?php echo $vlink ?>" alink="<?php echo $alink ?>">
<?PHP include("template/tablestart.php"); ?>
<?PHP include("template/font.php"); ?>
<FONT face="<?php echo $face ?>" size="<?php echo $size ?>">
<form name="form1" method="post" action="login2.php">
<p>Username
<input name="username" type="text" id="username">
</p>
<p>Password
<input name="password" type="password" id="password">
</p>
<p>
</p><input type="submit" name="Submit" value="Submit">
</form>
<p> </p>
<? // Second part of script time script ?>
<?PHP include("includes/exetime2.php"); ?>
<?PHP include("template/tableend.php"); ?>
</font>
</body>
</html>Code: Select all
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<? // First part of script time script ?>
<?PHP include("includes/exetime1.php"); ?>
<?PHP include("template/textcolour.php"); ?>
<body bgcolor="<?php echo $bgcolor ?>" text="<?php echo $text ?>" link="<?php echo $link ?>" vlink="<?php echo $vlink ?>" alink="<?php echo $alink ?>">
<?PHP include("template/tablestart.php"); ?>
<?PHP include("template/font.php"); ?>
<FONT face="<?php echo $face ?>" size="<?php echo $size ?>">
<?PHP
//Connect to MySql
include("includes/connect.php");
//Select Database
include("includes/dbselect.php");
$username = $_POST['username'];
$password = md5($_POST['password']);
$result = ("SELECT id FROM users WHERE username = '$username' AND password = '$password'");
if(mysql_num_rows($result) == 1) {
echo 'Logged in<P>';
}
else
{
echo 'Not Logged in<P>';
}
?>
<? // Second part of script time script ?>
<?PHP include("includes/exetime2.php"); ?>
<?PHP include("template/tableend.php"); ?>
</font>
</body>
</html>Yes, I'm sure the username and pwd are accurate.