So I have a file upload portion on my website where the user can upload any doc or docx folder. Heres my html code:
You have to create the directory you're trying to move the file to, it won't automatically get created by move_uploaded_file.
Use mkdir(), http://php.net/mkdir, to create the directory and then move the file.
Here's an alternative ending to your script, which should do
// Create directory if it does not exist
if(!is_dir("Proposals/". $_SESSION["FirstName"] ."/")) {
mkdir("Proposals/". $_SESSION["FirstName"] ."/");
}
// Move the uploaded file
move_uploaded_file($_FILES["upload"]["tmp_name"], "Proposals/". $_SESSION["FirstName"] ."/". $_FILES["upload"]["name"]);
// Output location
echo "Stored in: " . "Proposals/". $_SESSION["FirstName"] ."/". $_FILES["upload"]["name"];