Upload New File

parent c64679aa
<!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>
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