Commit 27177997 authored by Gaetan Carabetta's avatar Gaetan Carabetta

update filenames

parent 3fd678a6
<html>
<head>
<title>Exercice</title>
<title>Clinique Vétérinaire</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
......@@ -45,9 +45,6 @@
} catch(PDOException $e){
echo "Erreur d'insertion '$e'";
}
?>
</body>
</html>
......@@ -2,20 +2,11 @@
<html>
<head>
<meta charset="utf-8">
<title>Insert Client </title>
<title>Clinique Vétérinaire</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table border = "1">
<tr>
<th> nom </th>
<th>prenom</th>
<th> ddn </th>
<th> adresse </th>
<th> numero </th>
</tr>
<?php
include("connexion.php");
$nom = $_POST['nom'];
......@@ -23,11 +14,11 @@
$ddn = $_POST['ddn'];
$add = $_POST['add'];
$ntel = $_POST['ntel'];
try
{
$vConn = new PDO("pgsql:host=$vHost;port=$vPort;dbname=$vData", $vUser, $vPass);
}
catch(PDOException $e)
} catch(PDOException $e)
{
echo "Erreur de la connexion '$e'";
}
......@@ -53,31 +44,7 @@
{
echo "Erreur en l'insertion '$e'";
}
$vSql ='SELECT * FROM client;';
try
{
$vSt = $vConn->prepare($vSql);
$vSt->execute();
}
catch(PDOException $e)
{
echo "Erreur en l'affichage des clients '$e'";
}
while ($vResult = $vSt->fetch(PDO::FETCH_ASSOC))
{
echo '<tr>';
echo "<td>$vResult[nom]</td>";
echo "<td>$vResult[prenom]</td>";
echo "<td>$vResult[ddn]</td>";
echo "<td>$vResult[adresse]</td>";
echo "<td>$vResult[numero]</td>";
echo '</tr>';
}
}
}
else
echo "Il faut de donner le numero de telephone";
......
<html>
<head>
<title>Exercice</title>
<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>
<body>
<h1>Information des animaux</h1>
<h1>Ajout d'un animal</h1>
<?php
// Connexion à la base de données
include("connexion.php");
......
<html>
<head>
<title> Insert Client </title>
<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>
<form method = "post" action = "ajouterClient.php">
<form method = "post" action = "addClient.php">
<P> Nom: <input type="text" name="nom"> <BR> </P>
<P> Prenom : <input type="text" name="prenom"> <BR> </P>
<P> Date de Naissance : <input type="date" name="ddn"> <BR> </P>
......
......@@ -4,7 +4,6 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<button onclick="location.href='ajouterClient.html'">Add </button>
<button onclick="location.href='ajouterClient.html'">Add </button>
<table border = "1">
<tr>
......
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