<?php 
session_start(); 
require_once('../conexion.php');
require_once('../include/sesiones.php');
$mar_id=limpiar($_GET['mar_id']);
$files = glob("../img/marca/$mar_id.jpg");
if(count($files) > 0) 
{ 
    foreach($files as $file) 
    { 
        unlink ("../img/marca/$mar_id.jpg"); //eliminar img marca de la carpeta 
    } 
} 
$borrar_sql=mysqli_query($con,"DELETE FROM marca WHERE mar_id=$mar_id") or die(mysqli_error($con));

echo '<div class="alert alert-danger alert-dismissable">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            <strong>Marca!</strong> Eliminada correctamente.
    </div>';
?>