Problems with MySQL and PHP4 when selectin Pictures
| From: | Franky | Date: | Mon, 22 May 2000 13:53:58 +0000 |
| Subject: | Problems with MySQL and PHP4 when selectin Pictures | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-284@lists.php.net to get a copy of this message | ||
Hello!
I wrote some code to save pictures in a MySQL Database.
Now I selected the picture and showed them in a HTML file
without any problems with the code below.
Today I made a upgrade to PHP4 a the same code doesn't
work anymore.
Can anybody help me with my problem?
Thank you
*********
A HTML - File
<img src="something.php3?id=$id">
**********
A PHP3 - File called something.php3
<?php
Header("Content-type: image/gif");
$debug = true;
include("inc/db_connect.inc.php4");
$sql = "select picture from person where id=$id";
$result = mysql_query($sql, $conn);
if ($result){
$row=mysql_fetch_object($result);
echo $row->picture;
}
else{
if ($debug) {echo "<p>".mysql_error($conn);}
}
}
?>