note 27953 rejected from function.header by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Fri, 27 Dec 2002 21:04:37 +0000 |
| Subject: | note 27953 rejected from function.header by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-41358@lists.php.net to get a copy of this message | ||
<?php
mysql_connect($hostName, $userName, $password) or die ("can't connect¡C");
mysql_select_db($databaseName) or die("can't select DB");
$result = mysql_query($SQL = "SELECT * FROM pronotedetphoto WHERE po='$po' and id =
'$id'")
or die("MYSQL detect error¡G " . mysql_error() . "<br><br>" .
"SQL is¡G $SQL<br><br>");
if ($result_ar = mysql_fetch_array($result))
{
header("Content-type: image/jpeg");
echo $result_ar['file_data'];
}
else
{
die("this id doesn't contain image");
}
?>
i can show the jpeg file on this php file, but i can't show any text. i know that i use
header("Content-type: image/jpeg"); so i can't show any text on it. Also this php
file is called by another link,
<?php
//callphoto.php
printf("<td width=29%% rowspan=19%%><A
HREF=\"ch15ex06.php?id=%s&pnno=%s\">see
photo</A></td>",$row->id,$key);
?>
if i want to show the jpeg file on the callphoto.php directly, what can i do?