Hi everyone.
Can anyone please tell me if my PHP code secure or if there are holes in it? Is it vulnerable to hackers?
<?php
$news = "news.php";
$ext = ".php";
if(!isset($_GET['index'])){
include $news;
}
elseif(isset($_GET['index']) && file_exists($_GET['index'].$ext)){
include $_GET['index'].$ext;
}
?>
If it is can anyone please tell me a code that will do the same thing but has no holes or vulnerability in it. I want my web site to be able to open up my news page on the index, but than be able to change when I go to another page while keeping the layout the same
Thanksss! 
Last edited by SweetAngel8788; 12-08-2005 at 05:29 PM..
|