Log in

View Full Version : Adding a chunk of code



hmsnacker123
06-18-2008, 11:23 PM
hi, on my default.php file, when i get an 404 error, i want i to redirect to default, the ErrorDocument part is fine its just that i want it to display this:

<DIV class="errorBox">Error 404 - File Not Found </DIV>

when its found an error 404, because of: ?errorCode=404, then the <DIV class="errorBox">Error 404 - File Not Found </DIV> shows up with the indfo of the error already prefilled out in the php script. i know its sort of bluntly explained but please try and help !

Medyman
06-18-2008, 11:53 PM
Something like...


<?php

if($_GET['errorCode'] == "404") {
echo "<DIV class='errorBox'>Error 404 - File Not Found </DIV>";
}

?>