Forum Moderators: coopster
Parse error: syntax error, unexpected T_DOUBLE_ARROW
Line 22 is where the if statement starts:
$content = mysql_query("SELECT * FROM users where nick = '$username'");
//check to make sure we have this user
$success = mysql_fetch_row($content);
while($row = mysql_fetch_array($content))
{
$db_password = $row['password'];
}
if ($success[0] => 1 && $password == $db_password) {
$_SESSION['loggedin'] = 1;
}
else {header('Location: /login.php?error=1');}
Any blank lines / spaces before your opening <?php ...?