how would I write an IF statement that says if $req does not blank and equals string that does not exist then load, load_template(tpl_path.'err404.tpl'); so if $req does not match or equal something that is valid then show error page.
if ($req == '') load_template(tpl_path.'index.tpl');
if ($req == 'dologin') include 'includes/dologin.php';
Use a switch statement: