<?php
include('dbconnect.php');
session_start();

	$sid = mysqli_real_escape_string($connection, $_POST['sid']);
	$status = mysqli_real_escape_string($connection, $_POST['status']);
	
    $query ="UPDATE support SET status='$status' WHERE sid='$sid'";
    $query_run = mysqli_query($connection, $query);
    if($query_run)
    {
		$_SESSION['status'] = "<p style='padding:15px; background: #4E9C81; color: #fff; border-radius:10px;'>STATUS SUCCESSFULLY UPDATED</p>";	
		header('location:../support.php');
	}
    else
    {
		$_SESSION['status'] = "error.. NOT SUCCESSFULLY UPDATED";
		header('location:../support.php');
	}		


?>