query("SELECT `iszorginstelling` FROM `tbl_users` WHERE `email` = '$email'")->fetch_object()->iszorginstelling; // echo $tiepe; if ($tiepe=='1') { header("Location: ../startzorginstelling.php"); exit(); } else { header("Location: ../upload.php"); exit(); } } else { // Login failed header('Location: ../index.php?error=1'); exit(); } } else { // The correct POST variables were not sent to this page. header('Location: ../error.php?err=Kan niet inloggen'); exit(); }