<?php require "php/config.inc" ?>
<?php 
	session_start();
	if(isset($_GET['p'])){
		unset($_SESSION['producto'][$_GET['p']]);
		$temp = array_values($_SESSION['producto']);
		$_SESSION['producto'] = $temp;
		unset($_SESSION['numb'][$_GET['p']]);
		$temp = array_values($_SESSION['numb']);
		$_SESSION['numb'] = $temp;
		$_SESSION['contador']-=1;
	}
	
	$ta = 0;
	for($i = 0;$i< $_SESSION['contador'];$i++){
	$ta += $_SESSION['numb'][$i];}
	echo "  ".$ta;
	
?>