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

    $s = $_POST['v'];

    $sql = "UPDATE systemSettings SET `scheduleTabSelected` = '$s' WHERE userID = 1";
    
    if ($mysqli->query($sql) === TRUE) {
        echo "Record updated successfully";
    } else {
        echo "Error updating record: " . $mysqli->error;
    }
    
    $mysqli->close();
    