Commit 260e5b46 authored by Gaetan Carabetta's avatar Gaetan Carabetta

update website

parent 162f17b2
......@@ -31,7 +31,7 @@
$vSt = $vConn->prepare($vSql);
$vSt->execute();
header('Location: http://tuxa.sme.utc/~bdd0p042/application/animaux.php');
header('Location: http://tuxa.sme.utc/~bdd0p042/application/index.php');
}else
echo "Il faut donner une espece";
}else
......
......@@ -40,7 +40,7 @@
$vSt = $vConn->prepare($vSql);
$vSt->execute();
header('Location: http://tuxa.sme.utc/~bdd0p042/application/clients.php');
header('Location: http://tuxa.sme.utc/~bdd0p042/application/index.php');
}
catch(PDOException $e)
{
......
......@@ -21,7 +21,7 @@
$duree = $_POST['duree'];
$qte = $_POST['qteJour'];
if($qteJour!=""){
if($qte!=""){
if($idAnimal != ""){
if($idVeterinaire != ""){
if($medicament != ""){
......@@ -37,7 +37,7 @@
$vSt->execute();
header('Location: http://tuxa.sme.utc/~bdd0p042/application/traitements.php');
header('Location: http://tuxa.sme.utc/~bdd0p042/application/index.php');
}else
echo "Il faut donner une durée";
}else
......@@ -49,7 +49,7 @@
}else
echo "Il faut donner un animal";
}else{
echo "Il faut donner la quantité"
echo "Il faut donner la quantité";
}
} catch(PDOException $e){
echo "Erreur d'insertion '$e'";
......
<?php
include("back.php");
if ($_POST['affiche'] == "all"){
include("clients.php");
include("veterinaires.php");
......
<a href="index.php">Accueil</a>
......@@ -6,11 +6,11 @@
</head>
<body>
<h1>Information sur les especes</h1>
<form action='statEspeces.php' method='post'> <input type='submit' value='Statistiques générales'> </form>
<form action='statEspeces.php' method='post'><input type='submit' value='Statistiques générales'> </form>
<table border="1">
<tr>
<th>Classe</th>
<th>Espece</th>
<th>Classe</th>
<th>Statistique</th>
</tr>
<?php
......@@ -33,7 +33,7 @@
echo '<tr>';
echo "<td>$vResult[0]</td>";
echo "<td>$vResult[1]</td>";
echo "<td><form action='statEspece.php' method='post'> <input type='text' name='espece' value='$vResult[1]' hidden/> <input type='submit' value='Statistiques générales'> </form> </td>";
echo "<td><form action='statEspece.php' method='post'> <input type='text' name='espece' value=$vResult[0] hidden/> <input type='submit' value='Statistique'></form></td>";
echo '</tr>';
}
......
......@@ -3,7 +3,6 @@
<title>Clinique Vétérinaire</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<h1>Ajout d'un client</h1>
......
......@@ -3,7 +3,7 @@
<title>Clinique Vétérinaire</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
</head>
<body>
<?php
include("connexion.php");
......@@ -29,11 +29,7 @@
<?php
try{
$vSql ="SELECT A.especenom, AVG(A.poids)
FROM Animal A
WHERE A.especenom = '$espece'
GROUP BY A.especenom;
";
$vSql ="SELECT A.especenom, AVG(A.poids) FROM Animal A WHERE A.especenom='$espece' GROUP BY A.especenom";
$vSt = $vConn->prepare($vSql);
......@@ -59,11 +55,7 @@
<?php
try{
$vSql ="SELECT A.especenom, AVG(A.taille)
FROM Animal A
WHERE A.especenom = $espece
GROUP BY A.especenom;
";
$vSql ="SELECT A.especenom, AVG(A.taille) FROM Animal A WHERE A.especenom='$espece' GROUP BY A.especenom";
$vSt = $vConn->prepare($vSql);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment