<?
if ( !isset($i))
$a="index";
else
$a=$_GET['i'];;
if ( $a == "example1" )
include 'example1.php' ;
else
include 'example2.php' ;
?>
I hope this was just an example you wipped up quickly I can see one error which is staring me in the face.
$_GET isnt a register global its a super global, which is actually a good global believe it or not. Register globals allow any variables say $test for example
mydomain.com/file.php?test=testing
to have the value of $test with register_globals Off youd need to use $_GET['test'] and $test would be a totally different variable.
What you should check?
Well think what type of data should be allowed in each bit of user inputted data. So URLS if its an ID normally there numeric so check that they are numeric and nothing else.
Theres no diffiant checklist so what data you wish to obtain just make sure it matches. Also do not allow '; in inputted data you can easily fix this with the use of addslashes.