Upload image to mysql - Can someone help me please!

Oleg Butuzov

New member
<?
$f=fopen("image.jpg","rb");
$upload=fread($f,filesize("image.jpg"));
fclose($f);
$upload=addslashes($upload);
mysql_query("INSERT INTO `table` (`collum`) VALUES ('$upload')");
?>

you can modify this script for your needs...
 
Back
Top