PHp file in IMG tag
Posted: Mon Sep 01, 2008 5:29 am
Hi all,
Please look into my code TWo files..
1. <?php
include_once("../configure/config.php");
include_once("../lib_classes/class.DBaccess.php");
$me = new DBaccess();
$read_status = $me->readData("person", "person_id=".'21', "profile_photo, image_type");
if($read_status[0] == 1)
{
$image = $read_status[1][0]['profile_photo'];
$type = $read_status[1][0]['image_type'];
}
header("Content-type: ".$type);
echo $image;
?>
2. AND I am calling the file with an img tag..
<tr><td rowspan="7" align="left" valign="top"><img src= "show_profile_photo.php" width="114" height="104">
But here image is displaying after page is being refreshed. Not updating the image at first
time.
What I should I do to correct it..
Please help.
Regards
Please look into my code TWo files..
1. <?php
include_once("../configure/config.php");
include_once("../lib_classes/class.DBaccess.php");
$me = new DBaccess();
$read_status = $me->readData("person", "person_id=".'21', "profile_photo, image_type");
if($read_status[0] == 1)
{
$image = $read_status[1][0]['profile_photo'];
$type = $read_status[1][0]['image_type'];
}
header("Content-type: ".$type);
echo $image;
?>
2. AND I am calling the file with an img tag..
<tr><td rowspan="7" align="left" valign="top"><img src= "show_profile_photo.php" width="114" height="104">
But here image is displaying after page is being refreshed. Not updating the image at first
time.
What I should I do to correct it..
Please help.
Regards