title: Parse error: syntax error, unexpected end of file in
body: <p>Hi I am a new student in Php,. I am currently developing a login.php</p>
  
  <p>But after compiling i am getting this error message, </p>
  
  <pre><code>Parse error: syntax error, unexpected end of file in D:\xampp\htdocs\uploadthis\login.php on line 90
  </code></pre>
  
  <p>My login.php file is given below</p>
  
  <pre><code>&lt;?php   session_start();
  if(isset($_COOKIE["usNick"]) &amp;&amp; isset($_COOKIE["usPass"])){ ?&gt;
      &lt;META HTTP-EQUIV="REFRESH" CONTENT="0;URL=myaccount.php"&gt;
  &lt;?php 
      exit();
  }
  
  $display_error = "";
  $username = "";
  
  if ($_POST['username']) {
      $username = $_POST['username'];
      if( strtolower($_POST['code'])!= strtolower($_SESSION['texto'])){ 
          $display_error = "* Security Code Error"; // error language
          include ('error.php');
          exit();
      }else{
          include('includes/config.inc.php');
          $username=uc($_POST['username']);
          $pass=uc($_POST['password']);
          $password = sha1($pass);
  
          if ($password==NULL) {
              $display_error = "* All fields are required"; // error language
              include ('error.php');
              exit();
          }else{
              $myDb-&gt;connect();
                  $query = mysql_query("SELECT username,password FROM yob_users WHERE username = '$username'") or die(mysql_error());
                  $data = mysql_fetch_array($query);
              $myDb-&gt;close();
              if($data['password'] != $password) {
                  $display_error = "* Please, Check your username/password."; // error language
                  include ('error.php');
                  exit();
              }else{
                  $myDb-&gt;connect();
                      $query = mysql_query("SELECT username,password FROM yob_users WHERE username = '$username'") or die(mysql_error());
                      $row = mysql_fetch_array($query);
                  $myDb-&gt;close();
                  $nicke=$row['username'];
                  $passe=$row['password'];
                  setcookie("usNick",$nicke,time()+7776000);
                  setcookie("usPass",$passe,time()+7776000);
                  $lastlogdate = date("F j, Y - g:i a");
                  $lastip = getRealIP();
                  $myDb-&gt;connect();
                      $querybt = "UPDATE yob_users SET lastlogdate='$lastlogdate', lastiplog='$lastip' WHERE username='$nicke'";
                      mysql_query($querybt) or die(mysql_error());
                  $myDb-&gt;close(); ?&gt; 
                  &lt;META HTTP-EQUIV="REFRESH" CONTENT="0;URL=myaccount.php"&gt;
  &lt;?
              }
          }
      }
  }else{ 
      include ('header.php'); 
  ?&gt;
          &lt;div id="content"&gt;
              &lt;p class="error"&gt;&lt;?php echo $display_error;?&gt;&lt;/p&gt;
  
            &lt;form action="login.php" method="post" class="f-wrap-1"&gt;
            &lt;div class="req"&gt;&lt;a href="signup.php"&gt;Not Registered?&lt;/a&gt;&lt;br /&gt;&lt;a href="recoverpass.php"&gt;Forgot your Password?&lt;/a&gt;&lt;/div&gt;
            &lt;fieldset&gt;
  
            &lt;h3&gt;Member Login&lt;/h3&gt;
  
              &lt;label for="firstname"&gt;&lt;b&gt;Username:&lt;/b&gt;
              &lt;input id="username" name="username" type="text" class="f-name" autocomplete="off" tabindex="1" /&gt;&lt;br /&gt;
              &lt;/label&gt;
              &lt;label for="password"&gt;&lt;b&gt;Password:&lt;/b&gt;
              &lt;input id="password" name="password" type="password" class="f-name" autocomplete="off" tabindex="2" /&gt;&lt;br /&gt;
              &lt;/label&gt;
              &lt;label for="code"&gt;&lt;b&gt;Security Code:&lt;/b&gt;
              &lt;input id="code" name="code" type="text" class="f-name" autocomplete="off" tabindex="3" /&gt;&lt;br /&gt;
              &lt;/label&gt;
              &lt;label for="code2"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;
              &lt;img src="image.php?&lt;?php echo $res; ?&gt;" /&gt;&lt;br /&gt;
              &lt;/label&gt;
              &lt;div class="f-submit-wrap"&gt;
              &lt;input type="submit" value="Submit" class="f-submit" tabindex="4" /&gt;&lt;br /&gt;
              &lt;/div&gt;
              &lt;/fieldset&gt;
              &lt;/form&gt;
  
  &lt;?php
  include ('footer.php'); 
  }
  }
  ?&gt;
  </code></pre>
  
  <p>I have closed with </p>
  
  <blockquote>
    <p>}
    But still getting error,. but couldn't get it workerd. Please help. </p>
  </blockquote>