I designed a web form that takes as input a file and that should upload that file on the server. The file is located on the client machine. The page containing the web form is handled by PHP script.
I found out (reading 9483658954 forum topics so far) that there are 2 methods for getting a file uploaded. The first one is using FTP, and the second one using $_FILES variable. Unfortunately i have complains regarding both of the methods.
Firstly, when attempting to upload the file using FTP it seems that rather the FTP server is calling "upload" a simple copy action (because the only successful thing i could do with FTP was to copy a file from location A to location B, both A and B being on the server) or I don't know to use FTP (which is probably the right answer). Then, when using $_FILES variable, I was forced to include ' enctype="multipart/form-data" ' in the form tag. After a long documentation I finally figured out that by including the enctype blah blah, the $_POST and $_FILES variables were NULL after the form was submitted.Still can't understand why!
Are there any other methods for uploading a file from the client machine to the server? Can I get a competent script for this?