tp8
This commit is contained in:
15
2020-2021/TD8/modifier.php
Normal file
15
2020-2021/TD8/modifier.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$connect = new mysqli($servername, $username, $password, $dbname);
|
||||
if($connect->connect_errno){
|
||||
die("Connexion impossible");
|
||||
}else{
|
||||
echo "Connexion OK".'<br/>';
|
||||
}
|
||||
|
||||
$sql ="UPDATE ANNUAIRE SET numPost='".$_POST["numpost"]."' WHERE nom='".$_POST["nom"]."' and prenom='".$_POST["prenom"]."'";
|
||||
if($connect->query($sql)===TRUE && $connect->affected_rows>0){
|
||||
echo "Mise à jour OK".'<br/>';
|
||||
}
|
||||
else{
|
||||
echo "Erreur lors de la mise à jour : ".$connect->error;
|
||||
}
|
Reference in New Issue
Block a user