How not to include a php file
Hi there,
I have the following file call football.php. When you view it, it pulls the football text and football navigation stuff from the dec folder and displays it on the page.
<?php
if(isset($_REQUEST['suppliers']))
{
$companies=array(
"addidas",
"nike",
"head",
"converse",
"puma",
"reebok",
);
if(in_array($_REQUEST['suppliers'],$companies))
{
include "dec/suppliers/".$_REQUEST['suppliers'].".php";
}
}
?>
<?php include "dec/football-text.php";?>
<?php include "dec/football-navigation.php";?>
An example of the football navigation.php from above looks like this:
<td><a href="<?php echo $URLPREFIX;?>/feature-football.html?&suppliers=nike"><img src="images/football2010/images/Nike.jpg" alt="Nike"></td>
<td><a href="<?php echo $URLPREFIX;?>/feature-football.html?&suppliers=reebok"><img src="images/football2010/images/Reebok.jpg" alt="Reebok"></td>
<td><a href="<?php echo $URLPREFIX;?>/feature-football.html?&suppliers=puma"><img src="images/football2010/images/Puma.jpg" alt="Puma"></td>
