Shoutbox

mysql images - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: mysql images (/showthread.php?tid=28737)

mysql images by bach_m on 07-16-2004 at 01:36 AM

I'm trying to write a PHP web-aplication that, among other things, takes an image(or wav, or video) from a harddrive and store it in a database. it would be much easier to not need to deal with the file type.....

I don't know how to do this, really.
all i can guess is i need to take an image from an <input type=file>, and use chunk_split(base64_encode($file)) on it, and store that in the database.

does anyone know any good places learn about using the <input type=file>, and if there are any good tutorials to help do what i need.

i found this, and really need to know about <input type=file> so i can edit it to do that. but if you have suggestions on a better system to deal with the images, i'd be glad to here about it.

just to tell you, security is not that much of a concern, as the site is designed to run on a company intranet, with people who have better things to do rather than screw with the script or database. they don't want to be there, really.


RE: mysql images by KeyStorm on 07-16-2004 at 02:22 PM

You'll have to create a column in BLOB format and upload the content of the file (file_read_contents() will be enough), you don't need to base64 it.
http://dev.mysql.com/doc/mysql/en/BLOB.html

And well there is http://es.php.net/features.file-upload.

Please :google: or search next time :@