<?php 
	session_start();

	require "conexao.php";

	$id = filter_var( $_GET['id'], FILTER_SANITIZE_STRING);
	
	$query = "UPDATE cofre
				SET baixado = 1
				WHERE ID = '$id';";

	if (mysqli_query($conexao, $query)) {

		$_SESSION['msg'] = "<div class='alert alert-success'>Cadastrada com sucesso </div>";
		header("Location: ../cofre.php");
	}