help, ik heb een vraagje in verband met het veranderen van de content:

ik heb een bestandje content.php aangemaakt met een switch case zie code hieronder:

<?php
if (isset ($p)){
switch ($p){
case "index":
include ('home.php');
break;
case "kalender":
include ('kalender.php');
break;
case "prikbord":
include ('prikbord.php');
break;
case "documenten":
include ('documenten.php');
break;
case "logout":
include ('logout.php');
break;
case "zoeken":
include ('zoeken.php');
break;

}
}else{
include ('home.php');
}
?>

en mijn index.php ziet er als volgt uit:

<?php
session_start();
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">;
<html>
<head>
<title>Intranet</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="opmaak.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="809" height="441" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="809" height="1"><img src="IMAGES/pixel_zwart.gif" width="800" height="1"></td>
</tr>
<tr>
<td><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1" height="41"><img src="IMAGES/pixel_zwart.gif" width="1" height="41"></td>
<td width="673" height="41"><img src="IMAGES/img_header.jpg" width="673" height="41"></td>
<td width="33" height="41"><a href="index.php?p=home.php"><img src="IMAGES/img_home.gif" width="33" height="41" border="0"></a></td>
<td width="5" height="41"><img src="IMAGES/pixel_wit.gif" width="5" height="41"></td>
<td width="40" height="41"><a href="index.php?p=zoeken.php"><img src="IMAGES/img_zoeken.gif" width="40" height="41" border="0"></a></td>
<td width="5" height="41"><img src="IMAGES/pixel_wit.gif" width="5" height="41"></td>
<td width="42" height="41"><a href="index.php?p=mailform.htm"><img src="IMAGES/img_contact.gif" width="42" height="41" border="0"></a></td>
<td width="1" height="41"><img src="IMAGES/pixel_zwart.gif" width="1" height="41"></td>
</tr>
</table></td>
</tr>
<tr>
<td>
<!--- BEGIN NAVIGATIE --->
<?php
{include('nav.php');}
?>
<!--- EINDE NAVIGATIE --->
</td>
</tr>
<tr>
<td><table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1" height="38"><img src="IMAGES/pixel_zwart.gif" width="1" height="38"></td>
<td width="798" height="38"><img src="IMAGES/img_ondernav.gif" width="798" height="38"></td>
<td width="1" height="38"><img src="IMAGES/pixel_zwart.gif" width="1" height="38"></td>
</tr>
</table></td>
<!--- EINDE HEADER --->
</tr>
<tr>
<td width="809" height="441"><table width="800" height="441" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1" height="440" background="IMAGES/pixel_zwart.gif"><img src="IMAGES/pixel_zwart.gif" width="1" height="1"></td>
<td width="121" height="440" valign="top" background="IMAGES/img_left.jpg"><table width="121" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="121" height="14"><img src="IMAGES/pixel_transparant.gif" width="121" height="14"></td>
</tr>
<tr>
<td><table width="121" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="121" height="1" align="center"><img src="IMAGES/pixel_oranje.gif" width="121" height="1"></td>
</tr>
<tr>
<td width="121" height="21"><table width="121" height="21" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1" height="22"><img src="IMAGES/pixel_oranje.gif" width="1" height="22"></td>
<td width="121" height="21" bgcolor="#5CA7BD" class="logintitel"><div align="left">
<p align="center" class="logintitel">Login</p>
</div></td>
<td width="1" height="22"><img src="IMAGES/pixel_oranje.gif" width="1" height="22"></td>
</tr>
</table></td>
</tr>
<tr>
<td width="121" height="1"><img src="IMAGES/pixel_oranje.gif" width="121" height="1"></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"></td>
</tr>
</table><table width="121" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="121" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="121" height="1" align="center"><img src="IMAGES/pixel_oranje.gif" width="121" height="1"></td>
</tr>
<tr>
<td width="121" height="21">
<!--- BEGIN LOGIN --->
<?php
{include('login.php');}
?>
<!--- EINDE LOGIN --->
</td>
</tr>
<tr>
<td width="121" height="1"><img src="IMAGES/pixel_oranje.gif" width="121" height="1"></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"></td>
</tr>
</table></td>
<td width="1" height="440" background="IMAGES/pixel_zwart.gif"><img src="IMAGES/pixel_zwart.gif" width="1" height="440"></td>
<td width="798" height="440"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="798" height="1" background="IMAGES/pixel_zwart.gif"></td>
</tr>
<tr>
<td height="438" valign="top"><table width="660" border="0" cellspacing="0" cellpadding="15">
<tr>
<td width="549" valign="top"><p>
<!--- BEGIN CONTENT --->
<?php
{include('content.php');}
?>

<!--- EINDE CONTENT --->
</p>
</td>
<td width="128" valign="top">
<!--- BEGIN PRIKBORD --->
<?php
{include('nieuws.php');}
?>
<!--- EINDE PRIKBORD --->
</td>
</tr>
</table></td>
</tr>
<tr>
<td width="616" align="center" class="adresgegevens">Visitatie Mariakerke - Zandloperstraat 8 - 9030 Mariakerke - <a href="mailto:[email protected]" class="adresgegevens">[email protected]</a></td>
</tr>
</table></td>
<td width="1" height="440" background="IMAGES/pixel_zwart.gif"><img src="IMAGES/pixel_zwart.gif" width="1" height="1"></td>
</tr>
</table></td>
</tr>
<tr>
<td width="809" height="1"><img src="IMAGES/pixel_zwart.gif" width="800" height="1"></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>

mijn navigatie.php als volgt:

<link href="opmaak.css" rel="stylesheet" type="text/css">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1" height="19"><img src="IMAGES/pixel_zwart.gif" width="1" height="19"></td>
<td width="798" height="19" background="IMAGES/pixel_blauw.gif" class="navigatie"><img src="IMAGES/pixel_transparant.gif" width="1" height="1"><a href="index.php?p=home.php" class="navigatie">Home</a> <span class="navigatiestreep">|</span> <a href="index.php?p=kalender.php" class="navigatie">Kalender</a> <span class="navigatiestreep">|</span> <a href="index.php?p=prikbord_tonen.php" class="navigatie">Prikbord</a> <span class="navigatiestreep">|</span> <a href="index.php?p=con_documenten.php" class="navigatie">Documenten</a> <span class="navigatiestreep">|</span> <a href="index.php?p=logout.php" class="navigatie">Logout</a> </td>
<td width="1" height="19"><img src="IMAGES/pixel_zwart.gif" width="1" height="19"></td>
</tr>
</table>

Wat doe ik verkeerd? want hij blijft steeds mijn home.php tonen gelijk op welke link ik klik... kan me iemand helpen?
misschien is dit nog intressant om me te helpen:
ik heb bij mijn code nu een default gezet:

<?php

if (isset ($_GET['p'])){
switch ($_GET['p']){
case "index":
include ('home');
break;
case "kalender":
include ('kalender');
break;
case "prikbord":
include ('prikbord');
break;
case "documenten":
include ('documenten');
break;
case "logout":
include ('logout');
break;
case "zoeken":
include ('zoeken');
break;
default:
echo 'he sukkel die bestaat niet: ' . $_GET['p'];
}

}else{
include ('home.php');
}

en krijg nu inderdaad na het klikken op mn navigatie de foutmelding van he sukkel die bestaat niet: home.php enzovoort.

kan iemand helpen?
<?php

if (isset ($_GET['p'])){
switch ($_GET['p']){
case "index":
include ('home');
break;
case "kalender":
include ('kalender');
break;
case "prikbord":
include ('prikbord');
break;
case "documenten":
include ('documenten');
break;
case "logout":
include ('logout');
break;
case "zoeken":
include ('zoeken');
break;
default:
echo 'he sukkel die bestaat niet: ' . $_GET['p'];
}

}else{
include ('home.php');
}
?>

Include home??? Je huis ofsow?
Kweet ook niet wat je in de link meegeeft...
Doe het zo:
<?
link?page=home (or whatever)
?>
<?
if ($_GET['p'])
{
switch ($_GET['p'])
{
case "index":
include "home.php";
break;
case "kalender":
include "kalender.php";
break;
case "prikbord":
include "prikbord.php";
break;
case "documenten":
include "documenten.php";
break;
enz...
}
?>
probeer eens met $_POST,

meestal doe ik 't volgende:
<?
if (!empty($_POST)) {
while (list($name, $value) = each($_POST))
{
$$name = $value;
}
}
?>
en 't zelfde voor $_GET

op die manier kan je via index.php?cmd=home

<?
switch($cmd)
{

}
?>
doen...

grtzz,
/me
owja, in je link:

index.php?cmd=home en niet:

index.php?cmd=home.php, aangezien je in je switch ook niet test op "home.php", maar op "home" !

knuf,
/me

Reageren