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:
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');
}
?>