seran128 Posted November 24, 2006 Share Posted November 24, 2006 I am storing images in mysql (don't ask its a client request) I can see the images in Navicat as images but when I go to get it out with a select statement I get garbage.my code[code]function getpicturecontent($inId){ global $connection; $sql="select * from images where ItemId='$inId'"; echo $sql; $result=mysql_query($sql,$connection) or die(mysql_error()); while($row=mysql_fetch_array($result)) { $getpicturecontent .= "<table width='200' border='0'> <tr> <td>" . $row['content'] . "</td> </tr> <tr> <td></td> </tr> </table>";}return $getpicturecontent;} [/code] This returns a bunch of characters. I know there is a header call I have to do but I cant find it. Quote Link to comment Share on other sites More sharing options...
fert Posted November 24, 2006 Share Posted November 24, 2006 [code]header("Content-type: image/image type");[/code] Quote Link to comment Share on other sites More sharing options...
seran128 Posted November 24, 2006 Author Share Posted November 24, 2006 Where do I place that code at? Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted November 24, 2006 Share Posted November 24, 2006 at the top of the page, change the image type in that header to the type of image, jpeg etc... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.