Unexpected T_ELSE Statement
Posted: Wed May 31, 2006 4:53 pm
Hi, I have this script here and im not sure why i am getting this error:
My script is :
can anyone tell me what i have done wrong (voided any of the if else statement rules?)
My script is :
Code: Select all
<?PHP
session_start();
//simple check to see if the person is logged in
if($_SESSION['in'] != TRUE) {
echo 'You are not logged in,please log in at the admin area.';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Admin Page</title>
<style type="text/css">
<!--
.style1 {font-size: 16px}
.style4 {font-size: 24px}
-->
</style>
</head>
<body>
<h1>
<?PHP
else {
?>
</h1>
<div align="center" class="style1">
<p class="style4"> Admin Login</p>
<form id="form1" name="form1" method="post" action="login.php">
<p>Username
<input name="you" type="text" id="you" />
</p>
<p>Password
<input name="me" type="text" id="me" />
</p>
<p>
<input type="submit" name="Submit" value="Submit" />
<input type="reset" name="Submit2" value="Reset" />
</p>
</form>
<p> </p>
<div align="center" class="style1"></div>
</div>
<?PHP
}
?>
</body>
</html>