php-db | 2002122
Date: 12/30/02
- Next message: John W. Holmes: "RE: [PHP-DB] SHOW PICTURE FROM DATABASE"
- Previous message: Nikos Gatsis: "[PHP-DB] SHOW PICTURE FROM DATABASE"
- In reply to: Nikos Gatsis: "[PHP-DB] SHOW PICTURE FROM DATABASE"
- Next in thread: nikos: "Re: [PHP-DB] SHOW PICTURE FROM DATABASE"
- Reply: nikos: "Re: [PHP-DB] SHOW PICTURE FROM DATABASE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Some suggestions...
On Monday, December 30, 2002, at 03:55 PM, Nikos Gatsis wrote:
> where showpict.php:
>
> $query="SELECT pict FROM pict WHERE pro_id= '$pro_id";
(You're missing an end ' there, but apparently that's not the problem)
> $result=mysql_db_query($database, $query, $conn) or Die
> (mysql_error());
> list($photo)=mysql_fetch_row($result);
> $type = $photo_type;
Where did the $photo_type variable come from? What's in it?
> if (!empty($photo)) {
> header("Content-Type: {$type}");
I believe this header should be in the form header("Content-Type:
image/jpeg") or whatever image type you have.
You should probably include an additional header
header("Content-Length: " . strlen($photo));
> echo $photo;
> }
>
> THANX
> Nikos
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: John W. Holmes: "RE: [PHP-DB] SHOW PICTURE FROM DATABASE"
- Previous message: Nikos Gatsis: "[PHP-DB] SHOW PICTURE FROM DATABASE"
- In reply to: Nikos Gatsis: "[PHP-DB] SHOW PICTURE FROM DATABASE"
- Next in thread: nikos: "Re: [PHP-DB] SHOW PICTURE FROM DATABASE"
- Reply: nikos: "Re: [PHP-DB] SHOW PICTURE FROM DATABASE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

