note 27975 added to function.header
| From: | edmundlcm at yahoo dot com | Date: | Sat, 28 Dec 2002 02:01:31 +0000 |
| Subject: | note 27975 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-41370@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?
--
http://www.php.net/manual/en/function.header.php
http://master.php.net/manage/user-notes.php?action=edit+27975
http://master.php.net/manage/user-notes.php?action=delete+27975
http://master.php.net/manage/user-notes.php?action=reject+27975