Flo: PHP Include innerhalb einer eingebundenen Seite

Beitrag lesen

Hier mal die Quelltexte der index.php und main.php:

index.php:

<body topmargin="0" rightmargin="0" marginwidth="0" marginheight="0" leftmargin="0" bottommargin="0">

<table width="100%" cellspacing="0" cellpadding="0" border="0" height="100%">
<tr>
<td width="30%" background="images/bg_dot.gif">&nbsp;</td>
<td background="images/bg_lft.gif" width="25">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td height="100%" valign="top" width="766"><table width="1000" border="0">
  <tr>
    <td><img src="images/headder.jpg" width="1000" height="200"></td>
  </tr>
  <tr>
    <td bgcolor="#00CC00">
<div align="center">
<span class="Stil1">
<a href="index.php?action=start">Startseite</a> |
<a href="index.php?action=ueberuns">Über uns</a> |
<a href="index.php?action=kontakt">Kontakt</a> |
<a href="index.php?action=ssp">SSP</a> |
<a href="index.php?action=impressum">Impressum</a> </span></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>

<?php  

switch($_GET["action"]){
case "start": include("main.php"); break;
case "ueberuns": include("ueberuns.php"); break;
case "kontakt": include("kontakt.php"); break;
case "ssp": include("ssp.php"); break;
case "impressum": include("impressum.php"); break;
default: include("main.php");
}
?>

</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table></td>
<td width="30%" background="images/bg.gif">&nbsp;</td>
</tr>
</table>

</body>
</html>

main.php:

main...<a href="index.php?action=niko">Link</a>
<?php
switch($_GET["action"]){
case "niko": include("test.php"); break;
}
?>