integrating mt updates page using php include

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rigdonia
Forum Newbie
Posts: 2
Joined: Sun May 23, 2004 1:07 pm

integrating mt updates page using php include

Post by rigdonia »

Hi all. I was using defective php code on my pages and was hacked. Ahem. My fault. Anyway, I went on over to evilwalrus.com and fixed it all up based on one of the tutorials over there. I am using this:

Code: Select all

<?php 
ini_set('include_path', 'home/rigdonia/public_html/'); 
switch ($_GET['r5']) { 
    case 'about': 
        include('about.php'); 
        break; 
    case 'main': 
        include('main.htm'); 
        break;
    case 'designupdates': 
        include('graphics/designupdates.php'); 
        break; 
    case 'customware': 
        include('customware.html'); 
        break;   
    case 'terms': 
        include('terms.html'); 
        break; 
    case 'portfolio': 
        include('portfolio.html'); 
        break; 
    case 'linkware': 
        include('linkware.html'); 
        break; 
    case 'resources': 
        include('resources.html'); 
        break; 
    case 'photography': 
        include('photography.htm'); 
        break; 
    case 'gallery': 
        include('gallery.htm'); 
        break; 
    case 'stock': 
        include('stock.htm'); 
        break; 
    case 'screensaver': 
        include('screensavers.htm'); 
        break; 
    case 'prints': 
        include('prints.htm'); 
        break; 
    case 'other': 
        include('other.htm'); 
        break; 
    case 'aboutme': 
        include('aboutme.html'); 
        break; 
    case 'contact': 
        include('contact.html'); 
        break; 
    case 'sitemap': 
        include('sitemap.htm'); 
        break; 
    case null: 
        include('main.htm'); 
        break; 
    default: 
        include('homeschoolcafe/includes/error.php'); 
        break; 
} 
?>
And it seems to work great! I only have one problem. Formerly, I was able to integrate my (moveable type) design updates blog - graphics/designupdates.php into the index page with the old fast and loose php code and now with the new, improved code, I am getting the error page. Any suggestions? Ideas? Answers, even? :wink: TIA!

(I guess you can visit the site if you want to see it for yourself - rigdonia.com and follow the graphics tab to see the error.)
rigdonia
Forum Newbie
Posts: 2
Joined: Sun May 23, 2004 1:07 pm

Post by rigdonia »

Dur.....nevermind. I changed the case on the link in question and it works fine! I guess thanks for listening anyway! LOL!
Post Reply