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.

After much frustration I finally figured out what I had overlooked. In order to see the entire image I just had to go into the php.ini and increase the value for the mssql.textlimit and mssql.textsize. I'm not sure if I had to do both or not, but it is working perfectly now.

Hopefully someone else can bypass my mistake through this post :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.