title: Unexpected end of file assistance
body: <p>So I am making my first website and upon submitting data in my registration form, I get an error stating "Unexpected end of file" on line 43 of my document. I keep looking for errors and I haven't found any to my knowledge. I looked at other threads on this site and checked for the problems that were offered as solutions to others. Nothing. Can anyone help? Here is my code.</p>
  
  <pre><code>&lt;?php
  session_start();
  include '../dbh.php';
  
  $first = $_POST['first'];
  $last = $_POST['last'];
  $email = $_POST['email'];
  $uid = $_POST['uid'];
  $pwd = $_POST['pwd'];
  
  if (empty($first)){
      header("Location:../signin.php?error=empty");
      exit();
  }
  if (empty($last)){
  header("Location:../signin.php?error=empty");
  exit();
  }
  if (empty($email)){
      header("Location:../signin.php?error=empty");
      exit();
  }
  if (empty($uid)){
      header("Location:../signin.php?error=empty");
      exit();
  }
  if (empty($pwd)){
      header("Location:../signin.php?error=empty");
      exit();
      } else{
          $sql ="SELECT uid FROM user WHERE uid='$uid'";
          $result = $conn-&gt;query($sql);
          $uidcheck = mysqli_num_rows($result);
          if ($uidcheck &gt; 0){
          header("Location:../signin.php?error=username");
          exit();
  }   else {
      $sql = "INSERT INTO user (first, last, email, uid, pwd) 
      VALUES ('$first', '$last', '$email', '$uid', '$pwd')";
      $result = $conn-&gt;query($sql);
  
      header("Location:../index.php");
  </code></pre>