"depot projets 2019"
This commit is contained in:
14
TD8/supprimer.php
Normal file
14
TD8/supprimer.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
$connect = new mysqli($servername, $username, $password, $dbname);
|
||||
if ($connect->connect_errno) {
|
||||
die("Connexion impossible");
|
||||
} else {
|
||||
echo "Connexion OK" . '<br/>';
|
||||
}
|
||||
|
||||
$sql = "DELETE FROM ANNUAIRE WHERE nom='" . $_POST["nom"] . "' and prenom='" . $_POST["prenom"] . "'";
|
||||
if ($connect->query($sql) === TRUE && $connect->affected_rows > 0) {
|
||||
echo "Suppression OK" . '<br/>';
|
||||
} else {
|
||||
echo "Erreur lors suppression : " . $connect->error;
|
||||
}
|
Reference in New Issue
Block a user