i dont actually get any errors
it just doesnt let me login
code:
<?
session_start();
if($_POST['submit'])
{
mysql_connect("localhost","****","****");
mysql_select_db("crimpa_forum");
$user = ($_POST['username']);
$pass = md5($_POST['password']);
$query = mysql_query("SELECT * FROM users WHERE username = '$user' AND password = '$pass' ");
$rows = mysql_num_rows($query);
if($rows == 1)
{
echo 'user logged in successfully';
$_SESSION['user'] = $user;
$_SESSION['pword'] = md5($pword);
}
else { echo 'incorrect username or password'; }
}
else
{
?>
<form method="post" action="login.php">
<TABLE>
<TR>
<TD valign="top">Username/TD>
<TD><INPUT NAME='username' TYPE='TEXT' VALUE='' size=30 maxlength="30"></TD>
</TR>
<TR>
<TD valign="top">Password</TD>
<TD><INPUT NAME='password' TYPE='password' VALUE='' size=30 maxlength="16">
</TR><br>
<TD valign="top"></TD>
<TD><INPUT TYPE="submit" name="submit" value="submit"></TD>
</TR>
</TABLE>
</form>
<?
}
?>