Home › Forums › Back End › Basic session variable help – create session to enable background onload › Reply To: Basic session variable help – create session to enable background onload
May 28, 2014 at 9:31 am
#171256
Participant
session_start();
if (!isset($_SESSION['backgroundLoad'])) {
$_SESSION['backgroundLoad'] = 0;
} else {
$_SESSION['count']++;
}
backgroundLoad
will always be 0
. You never increment it.
I would also suggest comparing loadit
to 0
(instead of ""
), since that’s what you’re actually passing to it.