<?php
require 'conexao.php';

  $chave = filter_var( $_POST['chave'], FILTER_SANITIZE_STRING);
  $obs = filter_var( $_POST['obs'], FILTER_SANITIZE_STRING);



//exclui o id
$sql = "DELETE FROM xml_chave WHERE chave='$chave' LIMIT 1";

mysqli_query($conexao, $sql);

   //inseri os valores recebidos nas variaveis acima
	$query = "INSERT INTO xml_chave (chave,obs) VALUES ('$chave', '$obs');";

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



<h3>ANOTADO FECHE A ABA !!!</h3>



	<?php } ?>


	<script type="text/javascript">
		
// Fechar a aba atual
window.close();

	</script>