diff --git a/html/users.php b/html/users.php index 308bfba9..20b5f334 100644 --- a/html/users.php +++ b/html/users.php @@ -12,9 +12,9 @@ if(isset($_POST['userid']) && isset($_POST['role']) && isset($_POST['accreditati $bdd = connect($dbhost, $dbname, $dbuser, $dbpass); $req = $bdd->prepare("UPDATE users SET role = :role, accreditation = :accreditation WHERE ID = :userid"); - $req->bindParam(':role',$_POST['role']); - $req->bindParam(':accreditation',$_POST['accreditation']); - $req->bindParam(':userid', $_POST['userid']); + $req->bindParam(':role',$_POST['role'], PDO::PARAM_INT); + $req->bindParam(':accreditation',$_POST['accreditation'], PDO::PARAM_INT); + $req->bindParam(':userid', $_POST['userid'], PDO::PARAM_INT); if ($req->execute()) { $status = "Utilisateur mis à jour"; } else { @@ -148,7 +148,7 @@ if(isset($_POST['userid']) && isset($_POST['role']) && isset($_POST['accreditati echo ""; echo "