title: Php Redirect to a new page from an if statement
body: <p>Please professional programmers in the house, what is wrong with this code?</p>
  
  <p>I get this error whenever i try to run it.</p>
  
  <blockquote>
    <p>Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\a\go.php on line 8</p>
  </blockquote>
  
  <p>The php code:</p>
  
  <pre><code>&lt;?php
  
  $term=$_POST['term'];
  $level=$_POST['level'];
  
  if  (
  
  $term = 'First';
  $level='js1';
  
  )
  {
  header("Location: result.php");
  exit();
  } 
  elseif (
  $term = 'First';
  $level='js2'; 
  )
  {
  header("Location: result2.php");
  exit();
  } 
  
  else {
  $error = "Entry is invalid";
  }
  
  ?&gt;
  </code></pre>