Piece of code that checks if session variable contains value >0.
$returns = FALSE;
for ($i=1;$i<40;$i++)
if ($_SESSION['QTY'][$i]>0) {
$returns = TRUE;
}
if($returns != TRUE) { header('Location:index.php');
}
//otherwise carry on down page of code
The above code gets ignored either way of the result being true or false. Wondering if there is an else bit left out. Thanks
$returns = FALSE;
for ($i=1;$i<40;$i++)
if ($_SESSION['QTY'][$i]>0) {
$returns = TRUE;
}
if($returns != TRUE) { header('Location:index.php');
}
//otherwise carry on down page of code
The above code gets ignored either way of the result being true or false. Wondering if there is an else bit left out. Thanks