Php include updating problem

Hi all,

Im having a problem with php.

i am calling a javascript function from flash to change the $_GET[‘action’] part of the url to the required one. basically the javascript finds out which page to show by its id which is passed from flash, and then simply opens the url like this:


window.location='index.php?action=showPage&pageid=' + id;

where id is the id of the page required…the index.php file has something like this to handle the id:


<?php
		if(!isset($_GET['action']))
		{
			include('about.php');
		}
		else if($_GET['action'] == 'showPage' && isset($_GET['pageid']))
		{
			if($pageid == 1) {
				include('about.php');
			} else if($pageid == 2) {
				include('upcoming.php');
			} else if($pageid == 3) {
				include('background.php');
			} else if($pageid == 4) {
				include('people.php');
			} else if($pageid == 5) {
				include('in_touch.php');
			}
		}
		?>

this works fine, however it updates the whole page, meaning my flash movie flickers and is set back to the start again. i was wondering if there was a better way to do this, so that only the content section is updated (for instance if the content was in a specific div).

i have considered using frames, but they suck, im sure there must be a way to do this with php.

note: all the sections of the site are split into divs such as “header” for the flash movie and “content” for the lower content part.