forked from mougnibas/archinsa
test
This commit is contained in:
parent
10255b0ce5
commit
ea47fc9efe
1 changed files with 10 additions and 1 deletions
11
bdd.php
11
bdd.php
|
@ -56,7 +56,16 @@ function ajouter_doc($request){
|
||||||
$sql = "INSERT INTO ensembles (commentaire_auteur,corrige_inclu) VALUES(?,?)";
|
$sql = "INSERT INTO ensembles (commentaire_auteur,corrige_inclu) VALUES(?,?)";
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$conn->execute_query($sql,array(htmlspecialchars($request['commentaire_auteur']),boolval($request["corrige_inclu"])));
|
$stm = $conn->prepare($sql);
|
||||||
|
echo "test1";
|
||||||
|
$request['commentaire_auteur'] = htmlspecialchars($request['commentaire_auteur']);
|
||||||
|
$request["corrige_inclu"] = boolval($request["corrige_inclu"]);
|
||||||
|
$stm->bind_param("si",$request['commentaire_auteur'],$request["corrige_inclu"]);
|
||||||
|
echo "test2";
|
||||||
|
$stm->execute();
|
||||||
|
echo "test3";
|
||||||
|
//$conn->execute_query($sql,array(htmlspecialchars($request['commentaire_auteur']),boolval($request["corrige_inclu"])));
|
||||||
|
|
||||||
saveFilesFromPost($request,mysqli_insert_id($conn));
|
saveFilesFromPost($request,mysqli_insert_id($conn));
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
echo(json_encode(["status"=>"0","msg"=>$e->getMessage()]));
|
echo(json_encode(["status"=>"0","msg"=>$e->getMessage()]));
|
||||||
|
|
Loading…
Reference in a new issue