Aunque la pregunta no va para mi te respondo por si te sirve de algo:
¿Porque haces un bucle? Eso puedes ahorrartelo, ya que si solo quieres un registro....
Código PHP:
$resultado = mysql_query("SELECT * FROM $tabla WHERE ID='{$_GET['id']}'",$conexion);
while ($fila = mysql_fetch_array($resultado))
{
$archivo=$fila["url"];
}
Pero lo que te interesa el código que yo uso, para qeu me abra un pdf es este :
Código PHP:
filename=".$nombre."");
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment; filename=".$nombre.";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($nombre));
Y ahora una pregunta, ¿que quieres preguntar tu? ¿como restringir el acceso a determinados ficheros? ¿como redirigir a un fichero ed la bbdd? ¿cual? Noqueda muy claro.. :)
hehe
saludos.