Code: Select all
<?
// Connects to Database
include("../base.php");
//checks cookies
if(isset($_COOKIE['ID_my_site'])){
$username = $_COOKIE['ID_my_site'];
$pass = $_COOKIE['Key_my_site'];
$check = mysql_query("SELECT * FROM records WHERE user = '$username'")or die(mysql_error());
while($info = mysql_fetch_array( $check )){
//if the cookie has the wrong password, they are taken to the login page
if ($pass != $info['word']){
header("Location: ../login.php");
}else{
?>
HTML CODE HERE
<?
//------------------------------
} }
}else{
//if the cookie does not exist, they are taken to the login
header("Location: ../login.php");
}
?>
<? include("../log-up.php"); ?>
<!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=utf-8" />
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
<? include("../log-down.php"); ?>
But when I try this It gives me a Parse error.