Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isset($_GET['id']) && $_GET["type"]=="image")
- {
- $id = $_GET['id'];
- $query = "SELECT * FROM Files WHERE ID = '$id'";
- $result = mysql_query($query) or die('Error, query failed');
- $row = mysql_fetch_array($result);
- {
- $data = $row['FileData'];
- $type = $row['ContentType'];
- }
- Header( "Content-type: $type");
- echo $data;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement