file upload into mySQL

From: Date: Thu, 25 Dec 2003 00:58:16 +0000
Subject: file upload into mySQL
Groups: php.db 
Request: Send a blank email to php-db+get-32183@lists.php.net to get a copy of this message
hi! I am uploading file into mySQL database from web site. But it is unable to upload it into database. If you know how to upload the file from web site into mySQL, could you please teach me how! the database information is; create table objects b_col blob, name varchar(30), file_size varchar(30), file_date datetime } -------------testform.php------------- <form method="post" action="upload.php" enctype="multipart/form-data"> <input type="hidden" name="MAX_FILE_SIZE" value="512000"> <input type="file" name="UploadedFile"><br> <input type="submit" value="SEND"> </form> ---------------------------------------------------- -------upload.php-------- $db = mysql_connect("localhost", "*****", "***"); mysql_select_db("*****",$db); $sql_insert = "LOAD DATA LOCAL INFILE '$HTTP_POST_FILES[$UploadedFile]'INTO TABLE objects"; mysql_query($sql_insert); ---------------------------------------------------- Regards, Hiro

« previous php.db (#32183) next »