here's the code. it just displays a broken image and i've no idea why. it starts on line 1. any help? it worked fine yesterday!
<?php
if($GET['id']) {
require_once('Connections/IntProg.php');
$query = sprintf("SELECT image, imagetype FROM images WHERE id=%s", $GET['id']);
mysql_select_db($database_IntProg, $IntProg);
$result = mysql_query($query, $IntProg) or die (mysql_error());
$data = mysql_result($result, 0, "image");
$type = mysql_result($result, 0, "imagetype");
header("Content-type:$type");
echo $data;
}
?>