Ooops... I mean HERE'S the corrected code
<?php
// Connect to the database server
include("config.php");
// Request the info of all the info
$result = @mysql_query("SELECT username,password FROM members");
if (!$result) {
echo("<p>Error getting information: " . mysql_error() . "</p>");
} else {
while ( $row = mysql_fetch_array($result)) {
$dbusername = $row[username];
$dbpassword = $row[password];
if (($HTTP_POST_VARS[username] == $dbusername) && ($HTTP_POST_VARS[password] == $dbpassword)){
header("Location: http://members.lycos.co.uk/clanx/ex.php");
} // endif
} // endwhile
} // endif
mysql_close();
?>
<html>
<head>
<title>Login</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><font face="Arial, Helvetica, sans-serif" size="5"><b>Login</b></font></p>
<form name="login" method="post" action="login.php">
Username: <input type="text" name="username" size="15" maxlength="15">
<br>
Password: <input type="password" name="password" size="15" maxlength="15">
<br><br>
<input type="submit" name="Login" value="Login">
<input type="reset" name="Clear" value="Clear">
</form>
</body>
</html>
__________________
------------------------------------------
Dan - www.shneak.com
|