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
| <!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" media="screen" type="text/css" title="non style" href="menu.css" />
<script src="script.js"></script>
</head>
<?php include('menu.php'); ?>
<?php include ('entete.php');?>
<div id="body">
<div id="content">
<form action="deconnexion.php"method="POST" >
<input type="submit" class="form-control" id="deco" name="deco" value="deconnexion">
</form>
<h2>Traitement</h2>
<p>
<br />
<br/ >
<?php
try
{
// connexion à la base fonctions
$bdd = new PDO('mysql:host=localhost;dbname=fonction;charset=utf8', '***', '***');
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
//$reponse = $bdd->query('SELECT * FROM patient');
?>
<table border="2px">
<tr>
<th>nom :</th>
<th>hospitalisé?</th>
<th>date naissance :</th>
<th>date sortie :</th>
</tr>
<?php while ($donnees = $reponse->fetch())
{
?>
<tr>
<td align="left"><?php echo $donnees['nom'];?>
</td>
<td><?php if ($donnees['hospitalisation'] == "1") {echo '<p style="color:#FF0000;">oui</p>';} else {echo "non";} ; ?></td>
<td><?php echo $donnees['date_naissance']; ?></td>
<td><?php if ($donnees['sorti'] == "1") {echo '<p style="color:#FF0000;">oui</p>';} else {echo "non";}; ?></td>
<td width="150">
<a href="supprimer.php?nom=<?php echo $donnees['nom']?>">supprimer</a>
</td>
</tr>
<?php
}
$reponse->closeCursor();
?>
</table>
</div>
<?php include ('footer.php');?>
</html> |
Partager