I've got a main php page that has the following code:
Code: Select all
<div id="bothrcontent">
<?PHP
// get navigation based on page called by URL
if(in_array($needle, $haystack)){
$contentfile = $needle.".php";
require $contentfile;
}
?>
</div>
Code: Select all
function error($msg) {
?>
<script type="JavaScript">
<!--
alert('<?=$msg?>');
history.back();
//-->
</script>
<?
exit;
}