From:             [EMAIL PROTECTED]
Operating system: Windows98
PHP version:      4.0.6
PHP Bug Type:     Apache related
Bug description:  Incorrect upload graphics files into MySQL when start PHP as Apache 
module

$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);
-- 
Edit bug report 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]

Reply via email to