Using the following will compensate for the changes php5 makes to Globals.
$tare = $GET['tare']; // makes $tare available from $get[] array
$tare = HTMLSpecialChars($tare); // Good cautionary measure
if (empty($tare)){
$tare = "some_default_value"; // I usually use 'index'
}
Now you will definately want to change the way you include() your files as andrewtayloruk points out.
Let's modify your preceding link code to the following:
<a href="main.php?tare=news" onmouseover="self.status='.News/Updates'; return true" onmouseout="self.status=''; return true" target="main"><img src="images/layout/bnews.jpg" border="0"></a>
First you need to add/adapt the code at the top of this reply to your main.php file.
Now you need to find a place to put all your content includes. I usually put them in a location such as:
$_SERVER["DOCUMENT_ROOT"] . "../inc/"
Which prevents them from being directly accessed. However, some webhosts don't allow user files above their given webroot so my alternative method is to give any include a ".htinc" filename. Apache (and probably others) does not send files matching ".ht*" to a browser. (which is the reason you can't access www.server.com/.htaccess in a browser).
When you decide what route you will take regarding include locations, the following code should get you started:
if (!(file_exists($SERVER["DOCUMENT_ROOT"] . "../inc/" . $tare . ".inc"))) $tare = "index";
include($SERVER["DOCUMENT_ROOT"] . "../inc/" . $tare . ".inc");
You will probably want to error check my code as I wrote it in a hurry.
R. Bowers