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
a0bc7407
Commit
a0bc7407
authored
Jun 20, 2019
by
Oswaldo Aldair Alanis Mayorga
Browse files
Upload New File
parent
c64679aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
application/rmClient.php
0 → 100644
View file @
a0bc7407
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
Insert Client
</title>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
</head>
<body>
<?php
include
(
"connexion.php"
);
$client
=
$_POST
[
'idClient'
];
$animal
=
$_POST
[
'idAnimal'
];
$traitement
=
$_POST
[
'idTraitement'
];
try
{
$vConn
=
new
PDO
(
"pgsql:host=
$vHost
;port=
$vPort
;dbname=
$vData
"
,
$vUser
,
$vPass
);
}
catch
(
PDOException
$e
)
{
echo
"Erreur de la connexion '
$e
'"
;
}
if
(
$client
!=
""
)
{
if
(
$animal
!=
""
)
{
if
(
$traitement
!=
""
)
{
$vSql
=
"DELETE FROM Animal where idTraitement = '
$traitement
';"
;
try
{
$vSt
=
$vConn
->
prepare
(
$vSql
);
$vSt
->
execute
();
}
catch
(
PDOException
$e
)
{
echo
"Erreur en l'affichage des clients '
$e
'"
;
}
$vSql
=
"DELETE FROM Animal where idAnimal = '
$animal
';"
;
try
{
$vSt
=
$vConn
->
prepare
(
$vSql
);
$vSt
->
execute
();
}
catch
(
PDOException
$e
)
{
echo
"Erreur en l'affichage des clients '
$e
'"
;
}
$vSql
=
"DELETE FROM Client where idClient = '
$client
';"
;
try
{
$vSt
=
$vConn
->
prepare
(
$vSql
);
$vSt
->
execute
();
}
catch
(
PDOException
$e
)
{
echo
"Erreur en le remove du client '
$e
'"
;
}
echo
"Succès dans l'effacement"
;
}
else
echo
"Il faut de donner le traitement"
;
}
else
echo
"Il faut de donner l'animal"
;
}
else
echo
"Il faut de donner le client"
;
?>
</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