User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,978 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,095 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

PhP Image help

Join Date: May 2008
Posts: 3
Reputation: WCSO-IT is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
WCSO-IT WCSO-IT is offline Offline
Newbie Poster

PhP Image help

  #1  
May 7th, 2008
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.
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 9:33 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC