Forums

Give help. Get help.

  • # September 3, 2012 at 7:43 am

    I’ve figured out my own way to load dynamic content with PHP and it works fairly well. I just want to know how I can stop the page from ‘flashing white’ each time the content is changed. Feel free to suggest any ways how I could do this better.

    Here’s a snippet:

    < ?php
    if(empty($_GET)){
    include ('subcontent/home.php');
    include ('content/home.php');
    }
    else if ($_GET == 'home'){
    include ('subcontent/home.php');
    include ('content/home.php');
    }
    else if ($_GET == 'webdev'){
    include ('subcontent/webdev.php');
    include ('content/webdev.php');
    }
    else if ($_GET == 'software'){
    include ('subcontent/software.php');
    include ('content/software.php');
    }
    else if ($_GET == 'websites'){
    include ('subcontent/websites.php');
    include ('content/websites.php');
    }
    else if (!empty($_GET) ){
    include ('error.php');
    header( 'refresh: 6; url=index.php');
    }
    ?>
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag