Parse error: syntax error, unexpected T_IF in H:\xampp\htdocs\login.php on line 74 i don't see any mistake here?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Yakity Yak</title>
<link href='http://fonts.googleapis.com/css?family=Oswald:400,300' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Abel|Satisfy' rel='stylesheet' type='text/css'>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<div id="wrapper">
  <p><!-- end #header --></p>
  <div id="header" class="container">
    <div id="logo">
      <h1><a href="#">Yakity Yak</a></h1>
    <div id="menu">
        <li class="current_page_item"><a href="../../Documents/Unnamed Site 2/index.html">Homepage</a></li>
        <li><a href="../../Documents/Unnamed Site 2/trip.html">Destinations</a></li>
        <li><a href="#">contact </a></li>
        <li><a href="#">Login</a></li>
      <p> <center><img src="ewrf.jpg" width="999" height="300"  alt=""/></center>  </p>
  <div id="page">
    <div class="post">
      <h2 class="title"><a href="#">Welcome to Yakity yak club</a></h2>
            <div class="entry">
<h2>Admin Log In</h2>
<!--Introduction Paragraph-->
    <form action="login.php" method="POST">
    <table border="0.1">
<td><label for="email">Email Address:</label></td>
<td><input type="text" id="email" name="email"/> <br/> </td>
<td> <label for="password">Password:</label> </td>
<td> <input type="password" id="password:" name="password"/> <br/> </tr>
  <input type="submit" value="Log In" name="LogIn" />
//defining Varables
$host = "localhost";
$user = "root";
$pass = "";
$db = "admin";
$admin = "wellington@canoeandkayak.co.nz";

mysql_connect ($host, $user, $pass);
mysql_select_db ($db);

//Checking to see if the user has input any information
if(isset ($_POST['email'])) {
    $email = $_POST['email'];
    $password = $_POST['password'];
    $sql = "SELECT * FROM admin WHERE email = '".$email."' AND password = '".$password."' LIMIT 1 ";
    $res = mysql_query ($sql) or die(mysql_error())
    if ((mysql_num_rows($res) == 1) and ($email == $admin)) {
        header ("Location:homepage.php ");
    } else {
        echo 'Sorry you do not have access to this part of the site. Please use the general "Log In" under the "Home" Tab.';

<center><font color='white' size '5'>Not yet registered?
</font><a href='registration.php'>Sign Up Here</a>
3 Years
Discussion Span
Last Post by LastMitch

i done that and now eventhough i didnt put any information in when i click on login it still directed me to homepage.php


i done that and now eventhough i didnt put any information in when i click on login it still directed me to homepage.php


Did you set this up correctly?

I think the reason why it redirected is on line 74:

if ((mysql_num_rows($res) == 1) and ($email == $admin)) {

Admin is you.

Does that make sense?

Since you are on local host, try close your browser and open it again then login again.

Edited by LastMitch

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.