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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
| <form action="" method="post" name="frm_table">
<img src='../images/icons034.gif'>
<select name="table" onchange='go()' >
<option value='#'>Choisissez une table :</option>
<option value='integration'>Integration</option>
<option value='peripheriques'>Péripheriques</option>
<option value='connectiques'>Connectiques</option>
<option value='multimedia'>Multimédia</option>
<option value='consommables'>Consommables</option>
<option value='reseaux'>Réseaux</option>
<option value='notebook'>Notebook</option>
</select>
<input type="submit" value="Ok"><br><br>
</form>
<? if(isset($_POST['table'])){$table=$_POST['table'];}else {$table=("");} ?>
<form action="" method="post" name="frm_cat">
<img src='../images/icons034.gif'>
<select name="categorie" >
<option value='#'>Choisissez une categorie :</option>
<? $reduc=substr("$table",0 , 3);
$sql=mysql_query("select distinct(cat_$reduc) from $table");
while($row=mysql_fetch_array($sql)){
$cat=$row["cat_$reduc"];
echo("<option value='$cat'>$cat</option>");}
echo("</select><input type='hidden' name='reduct' value='$reduc'>
<input type='hidden' name='table' value='$table'>
<input type='submit' value='Ok'> ");
?><br><br>
</form>
<? if(isset($_POST['categorie'])){
$table=$_POST['table'];
$reduc=$_POST['reduct'];
$cat=$_POST['categorie'];}
else {
$cat=("");
$reduc=("");
$table=("");
}
?>
<form action="" method="post" name="frm_fam">
<img src='../images/icons034.gif'>
<select name='famille'>
<option value="#">Choisissez une famille :</option>
<? $result=mysql_query("select distinct(fam_$reduc) from $table where cat_$reduc='$cat'");
while($row2=mysql_fetch_array($result)){
$fam=$row2["fam_$reduc"];
echo("<option value='$fam'>$fam</option> ");}
?>
</select>
<input type="submit" value="Ok">
</form> |