I'm trying to define null, incase some one follows a link to (view.php?pdoc=newpage) And "newpage" wouldn't be in the varible list. Instead of "newpage" being blank, I'd like to display a 'file not found' error from a txt file. The 'null' works fine, if there is no varible in the url. (i.e. view.php?pdoc=)
<?php
$pdoc = $_GET['pdoc'];
if (($pdoc == NULL) || ($pdoc == "files/null.txt")) {
include 'files/null.txt';
}
if (($pdoc == contact) || ($pdoc == "files/contact.txt")) {
include 'files/contact.txt';
}
?>
Any one have any ideas, or direct me to part of the manual which will explain how to do this?
Thanks for any help or ideas.