The following syntax is incorrect:
$_session['page'$numberpages]=$CurrentPage;
What is the correct syntax?
The following syntax is incorrect:
$_session['page'$numberpages]=$CurrentPage;
What is the correct syntax?
You probably want this:
$_SESSION['page'.$numberpages] = $CurrentPage;
$_SESSION
is a special superglobal variable and needs to be in uppercase.'page'.$numberpages
needs the string concatenation operator.You're missing a dot, a concatenation dot:
$_SESSION['page' . $numberpages]=$CurrentPage;
Or use double quotes:
$_SESSION["page$numberpages"]=$CurrentPage;
And, variable names are case-sensitive in PHP, unlike function names. So, it should be $_SESSION
, instead of $_session
.