Members system problem

wxdqz

New Member
Can anyone tell me why this code deosn't work? This file is login.php:
<?php if(!isset($submit)){
?>
<form method=get action="login.php">
Username:<input type="text" name="username"><br>
Password:<input type="password" name="password"><br>
<input type="submit" name="submit" value=http://www.phpbuilder.com/board/archive/index.php/"Submit">
</form>
<?php
}
elseif(isset($submit)){
require('config.php');
mysql_connect($host, $user);
$query = mysql_db_query("members","SELECT * FROM details WHERE username=$username");
if($query["password"] == $password){
print("Access Granted<br><a href=http://www.phpbuilder.com/board/archive/index.php/file.php>Continue</a>");}
else{print("Either you are not signed up or you entered an incorrect password. Hit Back to try again.");}
}
?>

Whenever I try to use this system I get the "Either you are not signed up or..." message. Any ideas why?!
 
Back
Top