Parse Error
Posted: Sat Jul 14, 2007 6:40 pm
Thank you in advance for any help. I started learning PHP about a month ago and had to stop as work was out of control. Now that I am back into it, I am playing around with a page that will write one of two sentences depending on whether or not an access level for the user is "1" or not. When the page runs I get the following error:
Parse error: parse error, unexpected T_VARIABLE in /home/content/m/o/t/motionto/html/SecureSite/home.php on line 15
I know that this is probably a minor syntax error on my part but after an hour of trying to figure it out I figured I would ask for some help. The username and password are pulled from the form that his this page as the action.
<?PHP include("connection/connect.php"); ?>
<?PHP
$UserName = $_POST["UserName"];
$Password = $_POST["Password"];
?>
Your entered a username of <b>"<?PHP echo $UserName; ?>"</b> and password of <b>"<?PHP echo $Password; ?>"</b>.
<?PHP
$FindUser = "select AccessLevel from tbUser where UserName = '$UserName' and Password = '$Password'"
$FoundUser = mysql_query($FindUser) //this is line 15
if ($FoundUser == "1")
echo "This is what you see if you are a valid user.";
else echo "This is what you see if you are an invalid user.";
?>
Parse error: parse error, unexpected T_VARIABLE in /home/content/m/o/t/motionto/html/SecureSite/home.php on line 15
I know that this is probably a minor syntax error on my part but after an hour of trying to figure it out I figured I would ask for some help. The username and password are pulled from the form that his this page as the action.
<?PHP include("connection/connect.php"); ?>
<?PHP
$UserName = $_POST["UserName"];
$Password = $_POST["Password"];
?>
Your entered a username of <b>"<?PHP echo $UserName; ?>"</b> and password of <b>"<?PHP echo $Password; ?>"</b>.
<?PHP
$FindUser = "select AccessLevel from tbUser where UserName = '$UserName' and Password = '$Password'"
$FoundUser = mysql_query($FindUser) //this is line 15
if ($FoundUser == "1")
echo "This is what you see if you are a valid user.";
else echo "This is what you see if you are an invalid user.";
?>