Print text and image in the same page.

From: Date: Mon, 16 Dec 2002 01:20:10 +0000
Subject: Print text and image in the same page.
Groups: php.general 
Request: Send a blank email to php-general+get-128358@lists.php.net to get a copy of this message
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 problem? 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); OCIExecute($stmt); 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>"; OCIFreeStatement($stmt); OCILogoff($conn); echo "</body>"; echo "</html>"; ?> -----------------------------------------------

« previous php.general (#128358) next »