RE: [PHP] PHP - Oracle - BLOBs - Display BLOB data in a table
| From: | Chris | Date: | Wed, 03 Dec 2003 23:05:16 +0000 |
| Subject: | RE: [PHP] PHP - Oracle - BLOBs - Display BLOB data in a table | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-171743@lists.php.net to get a copy of this message | ||
You would need to have two separate pages, theimage.php and
displayimage.php.
theimage.php will just return the image data in a readable format the
browser knows is an image.:
<?php
Header( "Content-type: $type");
echo get_image_data($_GET['ImageID']);
?>
displayimage.php will be a normal php page with an image tag like this:
<img src="theimage.php?ImageID=2">
Chris
-----Original Message-----
From: Ahbaid Gaffoor [mailto:ahbaid@att.net]
Sent: Wednesday, December 03, 2003 2:46 PM
To: PHP General Mailing List
Subject: [PHP] PHP - Oracle - BLOBs - Display BLOB data in a table
I have written the first half of my application which stores images in
BLOB fields of an oracle database.
This part of my app. works fine.
I am now trying to download the database stored blob and display it in
my web page.
I am able to get the blob data into a variable called $blobdata.
If I just throw up a fresh page and issue the following code, the image
displays fine:
<?php
Header( "Content-type: $type");
echo $blobdata;
?>
Assume that I have a function which when given an image id it returns
the blob data as follows:
$blobdata = get_image_data(2); // Get the blob data for image as stored
in the database with id = 2
However, I would like to be able to place the blobdata say in a table
cell as follows:
<table><tr><td>
<?php
$blobdata = get_image_data(2);
echo $blobdata;
?>
</td></tr>
only problem is that I am getting gobbledygook charcaters in the cell as
the raw data is being printed, what sort of HTML or PHP functions
should I use to do this?
many thanks,
Ahbaid.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php