Re: inserting images into MySQL

From: Date: Thu, 04 Jan 2001 20:52:06 +0000
Subject: Re: inserting images into MySQL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32708@lists.php.net to get a copy of this message
On Tuesday 04 January 2000 21:26, pyramid@pyramid.pl wrote: > $f=fopen($path, "r"); > $contents=fread($f, filesize($path)); > fclose($f); > $contentsslashes=addslashes($contents); > db_query("insert into images (img) values($contentsslashes)"); That won't work. insert into images (img) values ('$contentsslashes') will (added quotes around $contentsslashes). -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) I saw God --------- and she was black.

« previous php.general (#32708) next »