Storing Img Binary in MySQL

From: Date: Thu, 06 Dec 2001 10:48:53 +0000
Subject: Storing Img Binary in MySQL
Groups: php.general 
Request: Send a blank email to php-general+get-76852@lists.php.net to get a copy of this message
I want to store the image binary data in a MySQL Blob field. So I created a simple form that prompted the client for an image file that would be uploaded to the server. The server takes the file and gets the following data, assuming ImgFile is the name of the uploaded image. $ImgTitle = $HTTP_POST_FILES['ImgFile']['name']; $ImgType = $HTTP_POST_FILES['ImgFile']['type']; $ImgSize = $HTTP_POST_FILES['ImgFile']['size']; When I go to save $ImgFile into MySQL is is actually saving the name of the temporary location of that file on my server and not the binary data that compose that image. This does not surprise I knew this much at least. So how do I get the Binary DATA to save and not the temp file location? Thx.

« previous php.general (#76852) next »