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
|
{source}
<!-- You can place html anywhere within the source tags -->
<script language="javascript" type="text/javascript">
// You can place JavaScript like this
</script>
<?php
function affiche($id)
{
alert("toto");
$query2 = "select * from CNV_PATIENT where ID_PATIENT = $id";
$result2 = mysql_query($query2);
while ( $row = mysql_fetch_array($result2, MYSQL_NUM) )
{
$id = $row[0];
$sexe = $row[1];
$age = $row[2];
$coms = $row[3];
$date = $row[4];
}
echo "
<form>
<table>
<tr> <td> Identifiant patient : </td> <td> <input name='id_patient' type='text' value='$id' > </td> </tr>
<tr> <td> Sexe patient : </td> <td> <input name='sexe_patient' type='text' value='$sexe' > </td> </tr>
<tr> <td> Age patient : </td> <td> <input name='age_patient' type='text' value='$age' > </td> </tr>
<tr> <td> Commentaires : </td> <td> <input name='coms_patient' type='text' value='$coms' > </td> </tr>
<tr> <td> Date de création : </td> <td> <input name='date_patient' type='text' value='$date' > </td> </tr>
</table>
</form>
";
}
// Liste déroulante pour les patients
echo "Selectionner l'identifiant de votre patient : ";
echo "<select name=\Identifiant\">";
$query = "select * from CNV_PATIENT";
$result = mysql_query($query);
while ( $row = mysql_fetch_array($result, MYSQL_NUM) )
{
$id = $row[0];
echo "<option value=\"$id\">$id</option>";
}
echo "<input type='button' value='Afficher' onclick ='affiche($id);' />";
?>
{/source} |
Partager