Hi all,

I try to print some information (text and image) that I retrieve from an oracle DB, 
but I got the image printed as binary junk. When I put the line that print the image 
in a  html image tag, I got a red square with "X" inside. What can I do to solve this 

This is my code:
echo "<html>";
echo "<head><title>Retrieve Results</title></head>";
echo "<body bgcolor=#Fge89j><br><br><br><br>";

$conn = OCILogon("*","*","*");
$query = "select country,continent,population,area,language,capital,map from countries 
where country=";
$query .= "'$country'";
$stmt = OCIParse($conn,$query);
OCIFetchInto($stmt, &$blob);

echo "<p><b>Retrieve Result:</b>";
echo "<br>";
echo "<b> Country:</b> $blob[0]";
echo "<br>";
echo "<b> Continent:</b> $blob[1]";
echo "<br>";
echo "<b> Population:</b> $blob[2]";
echo "<br>";
echo "<b> Area:</b> $blob[3]";
echo "<br>";
echo "<b> Language:</b> $blob[4]";
echo "<br>";
echo "<b> Capital:</b> $blob[5]";
echo "<br>";
echo "<img src=\"$blob[6]->load()\">";
echo "</p>";


echo "</body>";
echo "</html>";

Reply via email to