Hi, I'm creating an include so that if the password and username do not match on in the database, they are sent back to login.php If one matches int he database, the variable, $id, stores their username and password's id to be used later. Here's the code for the include page:
and here is the error I get:Code:<?php if($UserName && $PassWord){ $checksqlstatement = mysql_query("SELECT * FROM Teachers); while($checkotherstuff = mysql_fetch_array($checksqlstatement)){ if(($UserName==$checkotherstuff["UserName"]) && ($PassWord==$checkotherstuff["PassWord"])){ $id=checkotherstuff["id"]; $rightfullyhere="correct"; } } } if(!$rightfullyhere || $rightfullyhere!="correct"){ header("Location: login.php"); } ?>
I don't know what's wrong with the code, though...Code:Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in pass1.inc on line 5
aDog![]()







Bookmarks