Hi All

I store files on MYSQL server but when I try to pull them out ( show them on
screen or download ) with IE it download them twice before showing them up
:(

I played with the headers (adding, removing) with no success.
by the way in Netscape its work fine.

here is the last code tried:

<?
$query =  "select * from files where issue_id='$id'";
$result = mysql_query ($query)
 or die ("Invalid query");

 $data = @MYSQL_RESULT($result,0, "file_data");
 $type = @MYSQL_RESULT($result,0, "file_type");
 $file_name = @MYSQL_RESULT($result,0, "file_name");
 $file_size = @MYSQL_RESULT($result,0, "file_size");

 // # To force save file
 //header("Content-disposition: attachment; filename=\"$file_name\"");

 Header("Content-type: $type");
 header("Content-Length: $file_size");
 header("Content-Disposition: inline; filename=$file_name");

 echo $data;
?>

--------------------------
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--------------------------



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to