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















Data sent, redirection to the main page in few seconds...




The sended data are :


- For Indoor Lights =

- For Outdoor Lights =

- For the blind =

prepare($sql1); $stmt->execute(); } elseif ($LI == 'non') { $sql2 = "UPDATE `capteurs` SET `eInt` = '0' WHERE `capteurs`.`id` = 1"; $stmt2 = $conn1->prepare($sql2); $stmt2->execute(); } //================================================================================================================================================================================================================= if ($LE == 'Z') { $sql3 = "UPDATE `capteurs` SET `eExt` = '1' WHERE `capteurs`.`id` = 1"; $stmt3 = $conn2->prepare($sql3); $stmt3->execute(); } elseif ($LE == 'wrong') { $sql4 = "UPDATE `capteurs` SET `eExt` = '0' WHERE `capteurs`.`id` = 1"; $stmt4 = $conn2->prepare($sql4); $stmt4->execute(); } //================================================================================================================================================================================================================= if ($S == 'false') { $sql5 = "UPDATE `capteurs` SET `Store` = '1' WHERE `capteurs`.`id` = 1"; $stmt5 = $conn3->prepare($sql5); $stmt5->execute(); } elseif ($S == 'OUV') { $sql6 = "UPDATE `capteurs` SET `Store` = '0' WHERE `capteurs`.`id` = 1"; $stmt6 = $conn3->prepare($sql6); $stmt6->execute(); } //$stmt = $conn->prepare($sql); //$stmt->execute(); ?>