setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
// Connection MySQL for imgs displaying.
$bdd = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
}
catch(Exception $e)
{
// Si il y a une erreur, arret du script.
die('Erreur : '.$e->getMessage());
}
$sql = "UPDATE `capteurs` SET `A/M` = '1' WHERE `capteurs`.`id` = 1";
// Prepare statement
$stmt = $conn->prepare($sql);
// execute the query
$stmt->execute();
$conn = null;
?>