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");
}