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" "">
<html xmlns="">
<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=',300' rel='stylesheet' type='text/css'>
<link href='|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 = "";

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>

Recommended Answers

line 73 is missing a semi-colon

Jump to Post

All 4 Replies

line 73 is missing a semi-colon

you missed semicolon on line 73

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

Member Avatar

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.