<?php 
require_once ("../config/db.php");
require_once ("../config/conexion.php");
  
$id=intval($_GET['id']);
$query=mysqli_query($con, "select * from rubros where id_rubro='".$id."'");
$rw_user=mysqli_fetch_array($query);
$name=$rw_user['rubro'];
if($name!="")
{
	$del1="DELETE FROM rubros WHERE id_rubro='".$id."'";
	$delete1=mysqli_query($con,$del1);
   	header("location: ../rubros.php");
}
?>