Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gaetan Carabetta
projet_nf17_p19_tdg1_groupe2
Commits
dad84ea3
Commit
dad84ea3
authored
Jun 19, 2019
by
Gaetan Carabetta
Browse files
affichage client
parent
553ef95c
Changes
1
Hide whitespace changes
Inline
Side-by-side
application/clients.php
0 → 100644
View file @
dad84ea3
<html>
<head>
<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 clients
</h1>
<table
border=
"1"
>
<tr>
<th>
idClient
</th>
<th>
Nom
</th>
<th>
Prenom
</th>
<th>
Date de naissance
</th>
<th>
Adresse
</th>
<th>
Numéro
</th>
</tr>
<?php
// Connexion à la base de données
include
(
"connexion.php"
);
try
{
$vConn
=
new
PDO
(
"pgsql:host=
$vHost
;port=
$vPort
;dbname=
$vData
"
,
$vUser
,
$vPass
);
}
catch
(
PDOException
$e
){
echo
"Erreur de connexion '
$e
'"
;
}
// Affichage du tableau de données
$vSql
=
"select * from client"
;
try
{
$vSt
=
$vConn
->
prepare
(
$vSql
);
$vSt
->
execute
();
while
(
$vResult
=
$vSt
->
fetch
(
PDO
::
FETCH_BOTH
))
{
echo
'<tr>'
;
echo
"<td>
$vResult[0]
</td>"
;
echo
"<td>
$vResult[1]
</td>"
;
echo
"<td>
$vResult[2]
</td>"
;
echo
"<td>
$vResult[3]
</td>"
;
echo
"<td>
$vResult[4]
</td>"
;
echo
"<td>
$vResult[5]
</td>"
;
echo
'</tr>'
;
}
}
catch
(
PDOException
$e
){
echo
"Erreur de requete '
$e
'"
;
}
?>
</table>
</body>
</html>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment