I see that I need to write some security into my scripts (a $pages array, I think) but don't know just how to get the job done...
to begin with, my non-secure link looks like this:
Code: Select all
http://mydomain.com/content.php?content=filename.phpI find this code...
Code: Select all
$valid_pages = array(
"apage.php" => "",
"another.php" => "",
"more.php" => "");
if (!isset($valid_pages[$page])) {
// Abort the script
die("Invalid request");
}Unfortunately, like a lot of beginners, I've used the include
Code: Select all
<?Php Include("$content"); ?>specific questions are:
1) WHERE do I put the code for the $pages array,
2) How do I write the links to display '$content' in my template?
Any/all help much appreciated.
Thanks in advance.
mc