首页 > 解决方案 > 如果需要考勤数据,则打开考勤文件,否则打开单据文件

问题描述

我有两个 if 条件和 else 条件。如果需要考勤数据,则打开考勤文件,否则打开单据文件。另一个如果销售数据为空则打开销售文件的条件。这两个条件都在一个文件中使用。我试过这个但没有工作。

if($needupdate =='y'){
header("location:attendance.php?msg=attendance data needed");       
}else{
    header("location:slip.php");
}

if(empty($result5) ){
    header("location:sales.php?msg=sales data needed");       
}else{
    header("location:slip.php");
}

标签: if-statementheader

解决方案


推荐阅读