This is what I have in the upload section for the attachment..
PHP Code:
$filesize=@filesize($getfile);
$filenum = fopen($getfile,"rb");
$filestuff = fread($filenum,$filesize);
fclose($filenum);
$DB_site->query("INSERT INTO dwipfiles (filesid,title,userid,pagetext,dateline,groupid,filename,filedata) VALUES (NULL,'".addslashes($title)."','$bbuserinfo[userid]','".addslashes($pagetext)."','".time()."','".addslashes($groupid)."','".addslashes($attachment_name)."','".addslashes($filestuff)."')");
Like I said, only pictures are giving me problems so maybe I need to add something special for them?