Parse error: syntax error, unexpected T_ELSE in row 37 HELP!
THis is My Code:
if ($_POST ['submit'] )
$username = $_POST ['username'];
$password = $_POST ['password'];
if ($username && $password )
$query = mysql_query ("SELECT * FROM users");
while ($getrows = mysql_fetch_assoc ($query))
$dbuser = $getrows ['username'] ;
$dbuser = $getrows ['password'];
if (($username == $dbuser) && ($password == $dbpass))
echo "Login Successful.." ;
echo "Login Failure.." ;
die ("The username and passwords fields should not be left empty.");
Do not you see yourself you have two "else" for one "if"? I suppose it is because you forgot closing curly bracket before second "else".
I'd work on indenting your code. It will make things clearer and the error would stand out more.
Originally Posted by handcraftedweb
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)