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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
<div class="bloc">
<label>Customer : </label>
<select name="Customer" id="Customer" OnChange="this.form.submit()" />
<option value="-1" <?php if(isset($Customer) && $Customer != -1){echo "selected";} ?> >--Choisir--</option>
<?php
$res = mysql_query("SELECT COUNT( * ) AS Enregistrements , Customer FROM ToolBase GROUP BY Customer"); // on appelle la table pour extraire la liste des criteres
while( $val = mysql_fetch_array($res))
{
?>
<option value="<?php echo $val['Customer']?>" <?php if ($Customer==$val['Customer']){echo " selected";}
?>
>
<?php echo $val['Customer'] ?>
</option>
<?php
}
?>
</select>
<label>Manufacturer : </label>
<select name="Manufacturer" id="Manufacturer" OnChange="this.form.submit()" />
<option value="-1" <?php if(isset($Manufacturer) && $Manufacturer != -1){echo "selected";} ?> >--Choisir--</option>
<?php
$res = mysql_query("SELECT COUNT( * ) AS Enregistrements , Manufacturer FROM ToolBase WHERE Customer='$Customer' GROUP BY Manufacturer"); // on appelle la table pour extraire la liste des Constructeurs, sans conditions
while( $val = mysql_fetch_array($res))
{
?>
<option value="<?php echo $val['Manufacturer']?>" <?php if ($Manufacturer==$val['Manufacturer']){echo " selected";}
?>
>
<?php echo $val['Manufacturer'] ?>
</option>
<?php
}?>
</select>
</div>
<div class="bloc">
<label>System Type : </label>
<select name="System_type" id="System_type" OnChange="this.form.submit()" />
<option value="-1" <?php if(isset($System_type) && $System_type != -1){echo "selected";} ?> >--Choisir--</option>
<?php
// on appelle la table pour extraire la liste des systemes du constructeur choisi
$res = mysql_query("SELECT COUNT( * ) AS Enregistrements , System_type FROM ToolBase WHERE Customer='$Customer' AND Manufacturer='$Manufacturer' GROUP BY System_type");
while( $val = mysql_fetch_array($res))
{
?>
<option value="<?php echo $val['System_type']?>" <?php if ($System_type==$val['System_type']){echo " selected";}
?>
>
<?php echo $val['System_type'] ?>
</option>
<?php
}?>
</select>
<label>Tool Name : </label>
<select name="Tool_name" id="Tool_name" OnChange="this.form.submit()" />
<option value="-1" <?php if(isset($Tool_name) && $Tool_name != -1){echo "selected";} ?> >--Choisir--</option>
<?php
// on appelle la table pour extraire la liste des tools finale
$res = mysql_query("SELECT COUNT( * ) AS Enregistrements , Tool_name FROM ToolBase WHERE Customer='$Customer' AND Manufacturer='$Manufacturer'AND System_type='$System_type' GROUP BY Tool_name");
while( $val = mysql_fetch_array($res))
{
?>
<option value="<?php echo $val['Tool_name']?>" <?php if ($Tool_name==$val['Tool_name']){echo " selected";}
?>
>
<?php echo $val['Tool_name'] ?>
</option>
<?php
}?>
</select>
</div> |
Partager