Re: getting an image from a database

From: Date: Tue, 30 Jul 2002 20:10:50 +0000
Subject: Re: getting an image from a database
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-15029@lists.php.net to get a copy of this message
What field type are you using to store the image? -- Scott Carr OpenOffice.org Documentation Maintainer http://documentation.openoffice.org/ Quoting David Elliott <list@elliott.uk.com>: > hi all > > A small bit of php code below will pull an image from a database. My problem > is if the image is large (300 x 200) then it does not get displayed in IE. > smaller images do. It also works properly in Opera, and nutscrape for all > sizes. Any thoughts ? > > ==========8<============================================================= > @mssql_connect(Server,User,PWord) or die ("Could not connect"); > $ExcQry=" > select > structurepng > from > dbo.Product > where > ItemId = $SItemId"; > > $result = @mssql_query($ExcQry) or die ("The Query <hr><pre>".$ExcQry. > "</pre><hr>"."Gave this error<hr><br>".mssql_get_last_message ()); > > list($structurepng)=mssql_fetch_row($result); > > header("content-type: image/x-png"); > > print $structurepng ; > > flush() ; > ==========8<============================================================= > > -- > BFN, _______________________________________________ > David | David Elliott | Software Engineer | > _________________________| list@elliott.uk.com | PGP Key ID 0x650F4534 | > | Life is a dead-end street. | > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/

« previous php.windows (#15029) next »