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
| <?php
mysql_connect("localhost", "root", "");
mysql_select_db("p2i");
if (isset($_POST['site']) {
$filtre_site = $_POST['site'];
}
else {
$filtre_site = 'rosny';
}
$reponse = mysql_query('SELECT * FROM interventions WHERE site ="' . $filtre_site. '"');
//$reponse = mysql_query("SELECT * FROM interventions"); // Requête SQL
echo
//'<html><head></head><body>';
//while ($donnees = mysql_fetch_array($reponse) )
//{
//?>
<html>
<form method="POST" action="'.$_SERVER['PHP_SELF'].'">
<center>
<p><br>
<br>
<br>
</p>
<table width="200" border="1">
<tr>
<td><img src="banniere_dsi.jpg" width="800" height="160"></td>
</tr>
<tr>
<td height="500" bgcolor="#9EC2E4"> <center>
<p> </p>
<p> </p>
<p><strong>Recherche par Site : </strong>
<?php
$sql = " SELECT distinct site FROM probleme ";
$result = mysql_query($sql) or die("Requete pas comprise");?>
<select name="site">
<?php while ($row=mysql_fetch_array($result))
{
echo"<option>$row[0]</option>";
}?>
</select>
<?php
if ($_POST['site']) {
$filtre_site = $_POST['site'];
}
else {
$filtre_site = 'bobigny';
}
$sql = 'SELECT type,nom,prenom FROM interventions WHERE site ="' . $filtre_site. '"'; ?>
</p>
<table width="288" border="0">
<tr>
<td><strong>Type</strong></td>
<td><input name="nom" type="text" id="date4" value="<?php echo $donnees['type']; ?>" size="20" maxlength="35"></td>
</tr>
<tr>
<td><strong>Nom </strong></td>
<td><input name="nom" type="text" id="date4" value="'.$donnees['nom'].'" size="20" maxlength="35"></td>
</tr>
<tr>
<td><strong>Prenom</strong></td>
<td><input name="nom" type="text" id="date4" value="<?php echo $donnees['prenom']; ?>" size="20" maxlength="35"></td>
</tr>
<tr>
<td><strong>num_uc</strong></td>
<td><input name="date" type="text" id="date" value="<?php echo $donnees['num_uc']; ?>" size="20" maxlength="35"> </td>
</tr>
<tr>
<td><strong>Telephone</strong></td>
<td><input name="tel" type="text" id="tel" value="<?php echo $donnees['tel']; ?>" size="20" maxlength="70"></td>
</tr>
<tr>
<td><strong>Site</strong></td>
<td><input name="site" type="text" id="site" value="<?php echo $donnees['site']; ?>" size="20" maxlength="70"></td>
</tr>
<tr>
<td><strong>Probleme</strong></td>
<td><textarea name="probleme" id="textarea" value="<?php echo $donnees['probleme']; ?>"><?php echo $donnees['probleme']; ?></textarea></td>
</tr>
<tr>
<td><strong>Commentaire</strong></td>
<td><textarea name="commentaire" id="commentaire" value="<?php echo $donnees['commentaire']; ?>"><?php echo $donnees['commentaire']; ?></textarea></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
<p> </p>
</center></td>
</tr>
</table>
<p> </p>
<p> <br>
<br>
</p>
</center>
</form>
</html>
<?php
}
mysql_close(); // Déconnexion de MySQL
?> |