View Single Post
Old 04-05-2005, 05:42 PM   #10 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 651
DJMaze is on a distinguished road
$data = file('image.gif'); will not work because that's asci based.
use fopen(), fread() and fclose() to fill up $data
then
PHP Code:
mysql_query("INSERT INTO table VALUES ('".mysql_real_escape_string($data)."')"); 
Works perfectly on my system

for output of the data use
PHP Code:
header('Content-type: image/gif');
echo 
$data
DJMaze is offline   Reply With Quote