I have recently updated all my dynamic inclusion files to:
Code: Select all
<?php
if($_GET['band'])
{
$id = $_GET['band'];
include("bands/" . $id . '.php');
}
else
{
include("bands/band_index.php");
}
?>Any help gratefully appreaciated..
Moderator: General Moderators
Code: Select all
<?php
if($_GET['band'])
{
$id = $_GET['band'];
include("bands/" . $id . '.php');
}
else
{
include("bands/band_index.php");
}
?>Code: Select all
if(!empty($_GET))
{
foreach($_GET as $k => $v)
{
if(preg_match("/^[a-z0-9_]+$/i",$k) && is_file("bands/$k.php"))
{
include("bands/$k.php");
break;
}
}
}
else
{
include("bands/band_index.php");
}