Re: Uploading Files into MySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/24/07, benc11@xxxxxxxxx <benc11@xxxxxxxxx> wrote:
I am working on a script to upload files into MySQL db.  The following
script uploads to a file system how do I go about uploading the file
into the DB?  Where do I put the SQL statement in the code below?

                move_uploaded_file($_FILES['myfile']['tmp_name'],
                                        "/var/www/".$_FILES['myfile']['name']);

Right here you would read the file into a string with
file_get_contents(), then write an SQL query to insert the string.


--
Greg Donald
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux