File: /home/asjudine/www/callcenter/descargar_archivos_callcenter_id.php
<?php
require_once("../Conectarse.php");
global $dbi;
$result = mysql_query('SELECT * FROM archivos_callcenter WHERE id= "'.$_GET["id"].'"');
if (!$result) {
die('Invalid query: ' . mysql_error());
}
if ((mysql_num_rows($result)!=0))
{
$row = mysql_fetch_row($result);
$id = $row[0];
$nombre = $row[1];
$contenido = $row[4];
$tipo = $row[5];
header("Content-type: $tipo");
header("Content-Disposition: attachment; filename=$nombre");
print $contenido;
}
?>