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.