This is the whole code im using.
PHP Code:
<?php
$user = $_SESSION['username'];
$target_path = "../$user/Uploads/" + "../dean/";
Result is "uploads/filename.extension" */
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path))
{
echo ("The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded<br>");
print <<<HTML
<a href="show.php">click here to view the image</a>
HTML;
} else{
echo "There was an error uploading the file, please try again!";
}
?>
This code dont work and just places the file in its own directory
Bookmarks