Ok, so I’ve been looking over my php code over and over but keep getting the same error: “There was an error uploading the file, please try again!”. I have no idea why… everything looks golden. My guess is that the problem has to do with the target path, I dunno.
My form:
Choose a file to upload:
My php:[php][/php]
[php]<?php
$destination = '/Users/Ozzie/Sites/Project/upload/';
$destination = $destination.basename($_FILES['uploadedfile']['name']);
echo $destination;
echo "<br/>";
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $destination)) {
echo "The file ".basename( $_FILES['uploadedfile']['name']).
" has been uploaded";
} else {
echo "There was an error uploading the file, please try again!";
}
echo "<br/>";
print_r($_FILES);
?>
[/php]