hi
If I post an identifier to the following script below as it was a seperate page, it displays the image perfectly!!!
$query = "SELECT document, doc_type FROM documents WHERE doc_id = " . $doc_id;
$result = mysql_query($query) or die("No document exists, please try again");
if(mysql_num_rows($result) == 1)
{
$fileType = @ mysql_result($result, 0, "doc_type");
$fileContent = @ mysql_result($result, 0, "document");
header("Content-type: $fileType"); // <----I Think this is where the error lies
echo $fileContent;
}
else {
echo "No Document exists by the paramemter that has been pass throught";}
but when I ammend it to include it into a page I get the following:
ßVŸæÕ¿ò‡þ6ÓöØÑ0ýž§ôvÿ9öŸÙßõ¯µ~“ú2h—¤’§í~oW·Çþ2ó8hï3¦ÚqÓÿÐî3¾²ãaõ0r+u"9o®¢ÂiÛê2»è±—ìe¿Ìý²¯²eýÕÅ»#f7:•×>¬ôί‘SÂ˹®É¤¼—†ÿJ¯ÙöªéUì·ýèªÏÒ5uî±Ó~¼u Úþ»EÇÓq¯µž»ðê߯äÛn.-™6WEž¿¥¿Ñ}õ(²U}d! oˆi éE.wMéX~±œ|†z´tVVr©ugÓ²ûƒÅªÇYú;™‹C‘eLgÓÊÇõ,þr…¹ö O×ÛúÄ9:Ïïíúÿ7~ÏæÿEüÒ¡Ñ1YÒúF=.u—ÙÛëd´6àÛì~cþØú÷3×cúÍþ‘u~ªæ¿otÿüo
I think the error lies with the header information. Does anyone have any thought as to how I can solve the problem
Thanks