Nel seguente script php:
Codice PHP:
<?
include("include/database.php");
if(isset($_GET['p']) && is_numeric($_GET['p'])){
$res=array();
$resu=mysql_query("SELECT * FROM `pages` WHERE pid='".$_GET['pid']."' LIMIT 1") or die(mysql_error());
if(mysql_num_rows($resu)==1){
while($riga=mysql_fetch_assoc($resu)){
if($riga['pid']==$_GET['p']){
$res=$riga;
}
}
}else{
//header("Location: http://yis.altervista.org/yis/");
echo "End»";
die();
}
}else{
header("Location: http://yis.altervista.org/yis/");
die();
}
include("tpl/header.php");
include("tpl/top.php");
echo <<<EOM
<table class="skin_tbl" align="center" cellpadding="0" cellspacing="0"><tr><td class="mleft_top"></td><td><table class="mback" width="100%" cellpadding="0" cellspacing="0"><tr><td class="mback_left"></td><td class="mback_center">
<div class="mtitle">{$res['title']}</div>
</td><td class="mback_right"></td></tr></table></td><td class="mright_top"></td></tr><tr><td class="mleft"></td><td><table class="mainbg" style="text-align:center;width:100%" cellpadding="4" cellspacing="1">
<tr>
<td class="ww">{$res['content']}</td>
</tr>
</table></td><td class="mright"></td></tr><tr><td class="mleft_bottom"></td><td><table class="msub" width="100%" cellpadding="0" cellspacing="0"><tr><td class="msub_left"></td><td class="msub_center"> </td><td class="msub_right"></td></tr></table></td><td class="mright_bottom"></td></tr></table><br><br>
EOM;
include("tpl/bottom.php");
include("tpl/footer.php");
se io seguiģo l'url con ?p=1 mi viene ritornato End>> anzichč la pagina, eppure nel db la pagina c'č!
Dove sbaglio?
Ciao,
Yis