Hello all,
I have been working on a simple web app but have run into a small problem. I am still fairly new to php and have found nothing on this topic searching google. I have a getimage.php page that fetches an image from a SQL Server Express 2005 database. It seems to run fine, but when it pulls a picture, only about 1/3rd of the top is displayed. My for the getimage.php is below:
$query = "SELECT INMPICTURE FROM inmates WHERE BOOKNO = '$id'";
$result = mssql_query($query);
$data = mssql_result($result,0,"INMPICTURE");
header("Content-type: image/jpeg");
echo $data;
I'm hoping that it is a simple noobie mistake. Any help is greatly appreciated and thanks in advance.