                                                                                                                                         


<?php

$con = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);


        $room_id = $request->getAttribute('room_id');
       
		$room_name=$request->getParsedBody()['room_name'];
		
		
				
	$sql= ("UPDATE set_rooms SET   room_name='$room_name'  WHERE room_id=$room_id");	
	
 if($con->query($sql)){
		$data=array(
   
	"room_name"=>$room_name,	
	
	);
	    $message=$data;
	

	
	$response=array('status' => "true",'Message' => "Data updated successfully",'set_blocks' => $message);
echo json_encode($response);
        
}
        else{
          $response=array('status' => "false",'Message' => " update data failed");
         echo json_encode($response);
        }   
		
	

?>
