Upload New File

parent a0bc7407
<html>
<head>
<title> Voir à tous les clients </title>
<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>
<th> nom </th>
<th> prenom </th>
<th> ddn </th>
<th> adresse </th>
<th> numero </th>
</tr>
<?php
include("connexion.php");
try
{
$vConn = new PDO("pgsql:host=$vHost;port=$vPort;dbname=$vData", $vUser, $vPass);
}
catch(PDOException $e)
{
echo "Erreur de la connexion '$e'";
}
$vSql ='SELECT * FROM client;';
try
{
$vSt = $vConn->prepare($vSql);
$vSt->execute();
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>';
}
}
catch(PDOException $e)
{
echo "Erreur de requete '$e'";
}
?>
</table>
</body>
</html>
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