<?php
//setting header to json 
    header('Content-Type: application/json');
    header("Access-Control-Allow-Origin: *");

    $id = $_POST["id"];  // get internal sensor id from js
    require '../php/database.php';

    
    $sql = "UPDATE probes SET `plugged`='0' WHERE `address`='$id'";


    if ($mysqli->query($sql) === TRUE) {
        // echo "Widget Visible updated successfully";
    } else {
        // echo "Error updating Widget Visible: " . $mysqli->error;
    }
    
    $mysqli->close();
