gcombe Posted March 17, 2010 Share Posted March 17, 2010 ok here is my issue.. just need to have something evaluated upon login to a system.... if they have done an agreement and the info is put in the db they get the index page.. if not they get a 401k page. I think my issues is you can only call the header function once... which is why I figured using switch would only call it once upon meeting the case of $x if ($Login) { $emp_id = addslashes($_SESSION['username']); $stmt401 = OCIParse($Login, "select * from weber.info_check where emp_id = $emp_id"); OCIDefineByName($stmt401, "EMP_ID", $emp_id); OCIDefineByName($stmt401, "FORM401", $form401); OCIExecute($stmt401); while (OCIFetch($stmt401)) { } ocifreestatement($stmt401); $x = $form401; switch ($x) {case 1: if ($x == 1); { header("location: index.php");} break; case 2: if ($x != 1); { header("location: 401k.php"); } break; } //$emp_id = $username; //if($form401 < 1); { header("location: 401k.php");} //else {($form401 = 1); { header("location: index.php"); exit;} //else { header("location: 401k.php"); } //require "index.php"; //OCILogoff($Login); //header("location: index.php"); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.