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
27177997
Commit
27177997
authored
Jun 21, 2019
by
Gaetan Carabetta
Browse files
update filenames
parent
3fd678a6
Changes
5
Hide whitespace changes
Inline
Side-by-side
application/addAnimal.php
View file @
27177997
<html>
<head>
<title>
Exercic
e
</title>
<title>
Clinique Vétérinair
e
</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>
application/a
jouter
Client.php
→
application/a
dd
Client.php
View file @
27177997
...
...
@@ -2,35 +2,26 @@
<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
<?php
include
(
"connexion.php"
);
include
(
"connexion.php"
);
$nom
=
$_POST
[
'nom'
];
$prenom
=
$_POST
[
'prenom'
];
$ddn
=
$_POST
[
'ddn'
];
$add
=
$_POST
[
'add'
];
$ntel
=
$_POST
[
'ntel'
];
$nom
=
$_POST
[
'nom'
];
$prenom
=
$_POST
[
'prenom'
];
$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
)
{
echo
"Erreur de la connexion '
$e
'"
;
}
try
{
$vConn
=
new
PDO
(
"pgsql:host=
$vHost
;port=
$vPort
;dbname=
$vData
"
,
$vUser
,
$vPass
);
}
catch
(
PDOException
$e
)
{
echo
"Erreur de la connexion '
$e
'"
;
}
if
(
$nom
!=
""
)
{
...
...
@@ -46,38 +37,14 @@
$vSql
=
"INSERT INTO Client (nom,prenom,ddn,adresse,numero) VALUES ( '
$nom
','
$prenom
','
$ddn
','
$add
','
$ntel
');"
;
try
{
$vSt
=
$vConn
->
prepare
(
$vSql
);
$vSt
=
$vConn
->
prepare
(
$vSql
);
$vSt
->
execute
();
}
catch
(
PDOException
$e
)
{
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"
;
...
...
application/formulaireAnimal.php
View file @
27177997
<html>
<head>
<title>
Exercic
e
</title>
<title>
Clinique Vétérinair
e
</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
anima
ux
</h1>
<h1>
Ajout d'un
anima
l
</h1>
<?php
// Connexion à la base de données
include
(
"connexion.php"
);
...
...
application/
ajouter
Client.
html
→
application/
formulaire
Client.
php
View file @
27177997
<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 =
"a
jouter
Client.php"
>
<form
method =
"post"
action =
"a
dd
Client.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>
...
...
application/voirClients.php
View file @
27177997
...
...
@@ -4,8 +4,7 @@
<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>
<button
onclick=
"location.href='ajouterClient.html'"
>
Add
</button>
<table
border =
"1"
>
<tr>
<th>
nom
</th>
...
...
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