The code resides ina function:
function recordActivity($db, $type) {
if (!isset($_SESSION['actnCnt'])) {
$_SESSION['actnCnt'] = 0;
}
if (
(
($type == 'a' && $_SESSION['key'] != '') ||
($type == 'b' && $_SESSION['key'] != '') ||
$type == 'c'
) &&
$_SESSION['actnCnt'] < 4
) {
$db->query("INSERT INTO ... ");
$_SESSION['actnCnt'] ++;
}
}
and I can see the count by doing :
echo 'SESSION"<pre>';
print_r($_SESSION);
echo '</pre>';
These simple things bug me the most...