Results 1 to 2 of 2

Thread: Adding a chunk of code

  1. #1
    Join Date
    Mar 2008
    Posts
    122
    Thanks
    17
    Thanked 5 Times in 5 Posts

    Question Adding a chunk of code

    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 !

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Something like...

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

  3. The Following User Says Thank You to Medyman For This Useful Post:

    hmsnacker123 (06-19-2008)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •