Im making a website for a friend have encountered a really annoying problem. When every i run the script below i get this error: "Parse error: syntax error, unexpected '}' in /home/a1408362/public_html/members.php on line 36". I've tried everything i can think of but just cant fix it.
<?php // Connects to your Database mysql_connect("mysql3.000webhost.com", "a1408362_georgeb", "dryduck18") or die(mysql_error()); mysql_select_db("a1408362_data") or die(mysql_error());
//checks cookies to make sure they are logged in if(isset($_COOKIE['ID_my_site'])) { $username = $_COOKIE['ID_my_site']; $pass = $_COOKIE['Key_my_site']; $check = mysql_query("SELECT * FROM users WHERE username = '$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['password']) { header("Location: login.php"); }
//if user is administrator then go to admin view
if ($username = "administrator") {header("Location: admin.php") }
//otherwise they are shown the admin area else { }
else
//if the cookie does not exist, they are taken to the login screen { header("Location: login.php"); } ?>
<div id="templatemo_container_wrapper"> <div id="templatemo_container"> <div id="templatemo_header"> <div id="templatemo_site_title">Radio<span class="style2">Ilam</span></div> <div id="templatemo_site_slogan">Radio of the Suburbs</div> </div>