sorry, i didnt see the php tags.
I got the is_dir and mk_dir put in....thank you for that.
in line 4 I use a if (!file_exist) to start off the file upload.
So I assume I need to do something with line 11 where it echos the Error file already exists to make it run some sort of user prompt(i assume maybe a javascript???) to ask for a user prompt of overwrite or quit. but then how do i get it to continue to overwrite the file(do I use the move_uploaded_file command again?)
if((!empty($_FILES["uploaded"])) && ($_FILES['uploaded']['error'] == 0)) {
$filename = basename($_FILES['uploaded']['name']);
$upload_file = $upload_path.$filename;
if (!file_exists($upload_file)) {
if ((move_uploaded_file($_FILES['uploaded']['tmp_name'],$upload_file))) {
echo "It's done! The file has been saved as: ".$upload_file;
} else {
echo "Error: A problem occurred during file upload!";
}
} else {
echo "Error: File ".$_FILES["uploaded"]["name"]." already exists";
}
} else {
echo "Error: No file uploaded";
}