redirect.php 462 B

12345678910111213141516
  1. <?php
  2. include 'config.php';
  3. include 'con.php';
  4. $workerID = $_POST['workerID'];
  5. #get the role
  6. $sql = "SELECT ROLE_ID FROM DTC_WORKER_ROLE WHERE WORKER_ID = '{$workerID}'";
  7. $rolle = sqlStm($sql)['ROLE_ID'][0];
  8. if ($rolle == 2) {
  9. header("Location: ".$ip."PHP/forms/MAB.html?workerID=".$workerID);
  10. } else if ($rolle == 1){
  11. header("Location: ".$ip."PHP/forms/VORMA.html?workerID=".$workerID);
  12. }
  13. #header("Location: http://192.168.20.211:8080/PHP/forms/DTC.html");
  14. ?>