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 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
| <table width="550" border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#eeeeee" class="tableaux">
<form name="formulaire">
<tr><br> <B><big><big>Spécifier les paramètres de votre recherche : </big></big></b><br><br>
<td> le commutateure : </td>
<td>
<select name="cmt" id="cmt" STYLE="width:190">
<option></option>
<?php
$requeteD = "SELECT distinct ct FROM mic_hs ";
$resultatD = mysql_query($requeteD,$connexion) or die(mysql_error());
while ( $ligne = mysql_fetch_array($resultatD) ) {
$cmt = $ligne['ct'];
//echo '<option ></option>';
echo '<option >'.$cmt.'</option>';}
?>
</select>
</td>
<td> date :</td>
<td>
<select name="date_mic_hs" id="date_mic_hs" STYLE="width:190">
<option></option><?php
$requeteD = "SELECT distinct date_mic_hs FROM mic_hs ";
$resultatD = mysql_query($requeteD,$connexion) or die(mysql_error());
while ( $ligne = mysql_fetch_array($resultatD) ) {
$date_mic_hs = $ligne['date_mic_hs'];
//echo '<option></option>';
echo '<option >'.$date_mic_hs.'</option>'; }
?>
</select>
</td>
</tr>
<tr><td> mic :</td>
<td>
<select name="mic" id="mic" STYLE="width:190">
<option ></option>
<?php
$requeteD = "SELECT distinct mic FROM mic_hs ";
$resultatD = mysql_query($requeteD,$connexion) or die(mysql_error());
while ( $ligne = mysql_fetch_array($resultatD) ) {
$mic = $ligne['mic'];
//echo '<option ></option>';
echo '<option >'.$mic.'</option>'; }
?>
</select>
</td>
<td>etat :</td>
<td>
<select name="etat" id="etat" STYLE="width:190">
<option></option>
<?php
$requeteD = "SELECT distinct etat FROM mic_hs ";
$resultatD = mysql_query($requeteD,$connexion) or die(mysql_error());
while ( $ligne = mysql_fetch_array($resultatD) ) {
$etat = $ligne['etat'];
//echo '<option></option>';
echo '<option>'.$etat.'</option>'; }
?>
</select>
</td>
</tr>
<tr><td> PS :</td>
<td>
<select name="ps" id="ps" STYLE="width:190">
<option></option>
<?php
$requeteD = "SELECT distinct ps FROM mic_hs ";
$resultatD = mysql_query($requeteD,$connexion) or die(mysql_error());
while ( $ligne = mysql_fetch_array($resultatD) ) {
$ps = $ligne['ps'];
//echo '<option ></option>';
echo '<option >'.$ps.'</option>'; }
?>
</select>
</td>
<td> afct :</td>
<td>
<select name="afct" id="afct" STYLE="width:190">
<option></option>
<?php
$requeteD = "SELECT distinct afct FROM mic_hs ";
$resultatD = mysql_query($requeteD,$connexion) or die(mysql_error());
while ( $ligne = mysql_fetch_array($resultatD) ) {
$afct = $ligne['afct'];
//echo '<option ></option>';
echo '<option >'.$afct.'</option>'; }
echo '<option >cic</option>';
?>
</select>
</td>
</tr>
</tr>
<tr><td> NMFSC :</td>
<td>
<select name="nmfsc" id="nmfsc" STYLE="width:190">
<option></option>
<?php
$requeteD = "SELECT distinct nmfsc FROM mic_hs ";
$resultatD = mysql_query($requeteD,$connexion) or die(mysql_error());
while ( $ligne = mysql_fetch_array($resultatD) ) {
$nmfsc = $ligne['nmfsc'];
//echo '<option ></option>';
echo '<option >'.$nmfsc.'</option>';
}
echo '<option >nmfsc</option>';
?>
</select>
</td>
<td> OCC : </td>
<td>
<select name="occurence" id="occurence" STYLE="width:190">
<option></option>
<?php
$requeteD = "SELECT distinct occurence FROM mic_hs ";
$resultatD = mysql_query($requeteD,$connexion) or die(mysql_error());
while ( $ligne = mysql_fetch_array($resultatD) ) {
$occurence = $ligne['occurence'];
//echo '<option ></option>';
echo '<option >'.$occurence.'</option>'; }
echo '<option >occ</option>';
?>
</select>
</td>
</tr>
</form>
</table>
<?
$date_mic_hs = $_POST['date_mic_hs'];
$req = "SELECT * FROM mic_hs ";
$condition = " WHERE "; // attention aux espaces, et la premiere condition est where
// si premier param selectionné
if (isset($cmt) && $cmt!= "1")
{
$req .= $condition . " cmt = '" . $cmt . "' ";
$condition = " AND " ; // mnt on aura un AND
}
// si premier param selectionné
if (isset($date_mic_hs) && $date_mic_hs!= " ")
{
$req .= $condition . " date_mic_hs = '" . $date_mic_hs . "' ";
$condition = " AND " ; // mnt on aura un AND
}
if (isset($mic) && $mic!= "1")
{
$req .= $condition . " mic = '" . $mic . "' ";
$condition = " AND " ; // mnt on aura un AND
}
if (isset($etat) && $etat!= "1")
{
$req .= $condition . " etat = '" . $etat . "' ";
$condition = " AND " ; // mnt on aura un AND
}
if (isset($ps) && $ps!="1")
{
$req .= $condition . " ps = '" . $ps . "' ";
$condition = " AND " ; // mnt on aura un AND
}
if (isset($afct) && $afct!= "1")
{
$req .= $condition . " afct = '" . $afct . "' ";
$condition = " AND " ; // mnt on aura un AND
}
if (isset($nmfsc) && $nmfsc!= "1")
{
$req .= $condition . " nmfsc = '" . $nmfsc . "' ";
$condition = " AND " ; // mnt on aura un AND
}
if (isset($occurence) && $occurence!= "0")
{
$req .= $condition . " occurence = '" . $occurence . "' ";
$condition = " AND " ; // mnt on aura un AND
}
echo $cmt; echo '<br>'; echo $mic; echo '<br>'; echo $afct; echo '<br>'; echo $nmfsc; echo '<br>';
echo $occurence; echo '<br>'; echo $etat; echo '<br>'; echo $date_mic_hs; echo '<br>'; echo $ps; echo '<br>';
?> |
Partager