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

$userName = $_POST['userName'];

$response = "";

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

$sqlStream = "SELECT streamstatus FROM accounts WHERE username = '$userName'";
$resultStream = $mysqli->query($sqlStream);


if ($resultStream -> num_rows > 0) {
    $row = $resultStream->fetch_assoc();
    $response = $row["streamstatus"];
}


$mysqli->close();

echo $response;

?>