salut
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
if(!isset($_GET['niv']))
{
$r=mysql_query("select * from categorie where niveaucat like '_'");
while($t=mysql_fetch_array($r))
 {
 echo"<a href=''>".$t['titrecat']."</a>";
  $q=mysql_query("select * from categorie where niveaucat like '".$t['niveaucat']."_'");
  while($v=mysql_fetch_array($q))
  {
  echo"<a href='annonce.php?niv=".$_GET['niv']."'>".$v['titrecat']."</a>";
  }
 }
}
else
{
$r=mysql_query("select * from categorie where niveaucat like '".$_GET['niv']."_'");
while($t=mysql_fetch_array($r))
 {
 echo"<a href='annonce.php?niv=".$_GET['niv']."'>".$t['titrecat']."</a>";
  while($v=mysql_fetch_array($q))
  {
  echo"<a href='annonce.php?niv=".$_GET['niv']."'>".$v['titrecat']."</a>";
  }
 }
}
ce code affiche rien
est ce qu'il y a une methode de le faire sant tester $_GET['niv'] ==> pour le premier affichage de index.php il n y a pas de ver daun l'url
merci