Citation :
if (!isset($choix))
{
$sql="SELECT * FROM t_pages WHERE titre='accueil'";
$result=mysql_query($sql);
}
elseif (($choix)>20 && ($choix)<=30) {
$sql="SELECT designation, id_menu,num_page FROM t_menu JOIN t_activites WHERE id_menu=num_menu";
$result=mysql_query($sql);
}
elseif (($choix)>=31) {
$sql="SELECT designation, id_menu,num_page FROM t_menu JOIN t_agenda WHERE id_menu=num_menu";
$result=mysql_query($sql);
}
else
{
$sql="SELECT designation, num_page,id_menu FROM t_menu WHERE num_page=$choix";
$result=mysql_query($sql);
}
while($val=mysql_fetch_array($result)) {
echo "<a href=\"accueil.php?choix=".$val["id_menu"]."\">".$val["designation"]."</a><br/>\n";
} mysql_close();
|