ID: 12041 Updated by: derick Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Apache related Operating System: Windows98 PHP Version: 4.0.6 New Comment: You need to fopen the file with the "rb" settings. Windows wants these files opened as binary. Derick Previous Comments: ------------------------------------------------------------------------ [2001-07-11 04:54:39] [EMAIL PROTECTED] $fd = fopen ($imagefile, "r"); $imagedata = addslashes ( fread ( $fd, filesize ($imagefile) ) ); fclose ($fd); $link = mysql_connect ($Hostname, $Username, $Password) or die (mysql_errno($link).mysql_error($link)); $db = mysql_select_db ($Database, $link) or die (mysql_errno($link).mysql_error($link)); $query = "INSERT INTO $TableBanner (id, image) VALUES ('NULL', '$imagedata')"; @mysql_query ($query, $link) or die (mysql_errno($link).mysql_error($link)); mysql_close ($link); ------------------------------------------------------------------------ ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=12041&edit=1 -- PHP Development 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]