content.php switch
Scris: Mie Feb 02, 2011
index.php
content.php
de ce nu merge?
imi apare de ex cand dau click pe regulamet.php
imi apare doar ce e in regulametn .php si trebe cu tot cu ce e in index
unde am gresit?
Cod: Selectaţi tot
<?php
include 'style.php';
echo
'<div style="position:absolute;top:5px;left:37%"><img src="head1.jpg"></div>
<div style="position:absolute;top:324px;left:37%"><img src="head2.jpg" style="opacity:1;filter:alpha(opacity=100)" onmouseover="this.style.opacity=0.6;this.filters.alpha.opacity=50 " onmouseout="this.style.opacity=1;this.filters.alpha.opacity=100" ></div>
<div style="position:absolute;top:460px;left:37%"><img src="head3.jpg"></div>';
echo ' <!--Meniu-->';
echo '<div style="position:absolute;top:330px;left:39%"><font size=4><b><a href="index.php?pagina=a">Home</a></b></font></div>
<div style="position:absolute;top:353px;left:39%"><font size=4><b><a href="regulament.php?pagina=b">Regulament</a></b></font></div>
<div style="position:absolute;top:376px;left:39%"><font size=4><b><a href="login.php?pagina=c">Login</a></b></font></div>
<div style="position:absolute;top:399px;left:39%"><font size=4><b><a href="register.php?pagina=d">Register</a></b></font></div>
';
include 'content.php';
?>
Cod: Selectaţi tot
<?php
switch($pagina){
case a: include 'index.php';
case b: include 'regulament.php';
case c: include 'login.php';
case d: include 'register.php';
}
?>
imi apare de ex cand dau click pe regulamet.php
imi apare doar ce e in regulametn .php si trebe cu tot cu ce e in index
unde am gresit?