I think I covered myself security-wise, but want to see if there's a hole anyone can point out.
I'm restricting access to certain pages when user not logged in. Part of the security config looks like this: (The numbers, e.g. "01_01" refer to chapters and subchapters).
PHP Code:
if ($_SESSION['logged_in'] == "no") {
$secure_01_01 = 0;
$secure_01_02 = 0;
$secure_01_03 = 0;
$secure_01_04 = 0;
$secure_02_01 = 1;
$secure_02_02 = 1;
$secure_02_03 = 1;
$secure_02_04 = 1;
$secure_03_01 = 0;
$secure_03_02 = 1;
$secure_03_03 = 1;
$secure_03_04 = 1;
}
I then create the variable $restricted_access, with the predefined page-specific $chapter and $subchapter:
PHP Code:
$restricted_access = "secure_".$chapter."_".$subchapter;
and then...
PHP Code:
if ($$restricted_access != 1) {
display page;
} else {
dont!
}
Can $$restricted_access be expressed as a SESSION variable variable? I'd feel happier if it were. But is that even necessary?
Aargh, I'm out of my depth here.