I have called a database which has 4 "rows" of data in the field CNT. (2,1,3,1) I want to total these and when I hit a Max number, kick out to another php page. If the count is below the Max there is another header("Location...) command below.
It will not kick out - can you give me any suggestions
$Count = 0;
$Max = 5;
While ($row = mysql_fetch_assoc($result)) {
$Count = $Count + $row["Cnt"];
If ($Count > $Max) {
header("Location: pareAbilities.asp?Who=".$Who."&Logcode=".$LogCode."&A=".$row['A']."&B=".$row['B']."&CNT=".$Count );
}
}