Using a HTML form and PHP to upload a file
- Joel Lipman
- Personal Home Page
- Hits: 6572
Basically you have a HTML form with an input field type of 'FILE' (ie. <input type="file" name="file_to_upload" />) and want a PHP file to process this. This example applies to a Linux Apache MySQL PHP (LAMP) environment.
The Solution
1. The first thing to do is check that your HTML form is setup to do this: