<?php 
	if(!isset($_SESSION))
		session_start();
	if (!isset($_SESSION['usuarioLogin']) || $_SESSION['usuarioLogin'] == ""){
		session_unset();
		session_destroy();
		header("Location: login.php");
		exit();
	}
?>
<?php
	require_once('../../Connections/catalogo.php');
	if (isset($_GET['idMarca']) && $_GET['idMarca'] != ''){
		$query = "DELETE FROM marcaspiezas WHERE id = '" . $_GET['idMarca'] . "'";
		$mysqli->query($query);
	}
	$urlReferer = $_SERVER['HTTP_REFERER'];
	header("Location: " . $urlReferer);
	exit();
?>