class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
Here is part of my form - if the user chooses to upload their own stationery, "stationery_wrap" div is opened, the file box appears and they select their file from their hard drive. This is the file I want to upload onto the filesystem of my server, and put the filename into a mysql db.
<input type="radio" value="plain" class="stationery_radio" name="stationery_radio" checked />
<label for="plain" >Plain</label>
<input type="radio" value="easter" class="stationery_radio" name="stationery_radio" />
......
<input type="radio" value="own_stationery" class="stationery_radio" name="stationery_radio">
<label for="own_stationery">Add Your Own</label>
<div id="stationery_wrap">
<label for="custom_stationery">Select File: </label>
<input type="file" id="custom_stationery" value="" name="custom_stationery" />
</div>
All the variables are put in here:
In process, I call the upload:
Also, before you instantiate the class, can you dump the contents of $_FILES?