views:

19

answers:

1

I am making a website which gives the user the privilege of uploading a text document to the server. The server then should take the file and store it in the ftp server when it is uploaded and the SQL database should hold the data associated with the file.

+1  A: 

I believe this article should be a good starting point:

http://www.htmlgoodies.com/beyond/php/article.php/3472551/PHP-Tutorial-Uploading-Files.htm

One point which I don't think the article mentions is that the user which your web server runs as needs to have write access to the folder where you plan to store the files.

You can insert information about the file into the sql db from the $_FILES array after executing move_uploaded_file

kskjon