2020-09-07 10:27:18 +02:00

12 lines
379 B
PHP

<?php
$connect = new mysqli($servername, $username, $password, $dbname);
if($connect->connect_errno){
die("Connexion impossible");
}else{
echo "Connexion OK";
}
$insert = "INSERT INTO ANNUAIRE (nom,prenom,numPost) VALUES (?,?,?)";
$stmt = $connect->prepare($insert);
$stmt->bind_param("sss",$_POST["nom"],$_POST["prenom"],$_POST["numpost"]);
$stmt->execute();