<?php
require '../connForms/acdet.php';

$userName = $_POST['mobName'];

$streamStat = "streamoff";
$response = "";

$mysqli = new mysqli(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_NAME);

$userName = $mysqli->real_escape_string($userName);


$sql = "UPDATE accounts SET streamstatus = '$streamStat' WHERE username = '$userName'";
if($mysqli->query($sql) === true){
    $response = "ok";
} else{
   $response = "notok";
}

$mysqli->close();

echo $response;

?>