LuckySyringe
Technical User
This script I had displayed a flash file, but now it needs to be able to accept other MIME types as well -- I made a few changes, but it just returns blank...
...any help would be greatly appreciated.
-> LuckySyringe
Code:
<?php
error_reporting(E_ALL);
require 'config.php';
$id = $_GET['id'];
$dbTable = $_GET['tb'];
dbConnect();
$query = "SELECT content, mime_type FROM ".$dbTable." WHERE id=".$id;
$result = mysql_query("$query")
or die("Invalid query: " . mysql_error());
$data = mysql_fetch_array($result);
header("Content-type: ".stripslashes($data['mime_type']));
echo stripslashes($data['content']);
dbDisconnect();
?>
...any help would be greatly appreciated.
-> LuckySyringe