if($row > 0){ if(($row['unidad'])=='administrador'){ header("location: xxx.php"); }else if(($row['unidad'])=='gerencia'){ header("location: yyy.php"); };};