title: php if{} elseif{} else{} syntax error
body: <p>pls help me with code i dont get where is the error</p>
  
  <pre><code>$userrole = $row['type'];
  
  if ($userrole = "admin") {
          $_SESSION['name'] = $row['name'];
          header("Location: ../index.php"); 
  } elseif ($userrole = "encoder") {
          $_SESSION['name'] = $row['name'];
          header("Location: ../mencode.php"); 
  } elseif ($userrole = "verifier") {
          $_SESSION['name'] = $row['name'];
          header("Location: ../mverify.php"); 
  } else ($userrole = "approver") {
          $_SESSION['name'] = $row['name'];
          header("Location: ../mapproved.php"); } 
  </code></pre>
  
  <p>thnx in advance</p>