# PHP file uploader not working

**URL:** <https://forum.kirupa.com/t/php-file-uploader-not-working/270531>\
**Category:** programming\
**Created:** [September 10, 2008, 6:48pm UTC](https://forum.kirupa.com/t/php-file-uploader-not-working/270531 "2008-09-10T18:48:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnyct9760](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@johnyct9760](https://forum.kirupa.com/u/johnyct9760)\
**Post date:** [September 10, 2008, 6:48pm UTC](https://forum.kirupa.com/t/php-file-uploader-not-working/270531/1 "2008-09-10T18:48:09Z")

</div>

Hello and thx for reading my post. I can’t get this PHP uploader to work  
I followed the tutorial as closely as I could and something went wrong, here is a link to the test page:  
[http://www.johncliffordtaylor.com/upload2/](http://www.johncliffordtaylor.com/upload2/)  
Every time I upload it say that the file didn’t upload.  
Here is a link to the tutorial I was following:  
[http://www.tizag.com/phpT/fileupload.php](http://www.tizag.com/phpT/fileupload.php)  
And here is the PHP code that I ended up with I’ve looked it over for mistakes:

```auto
<?php
$target_path = "/johncliffordtaylor.com/upload2/uploads/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
$_FILES['uploadedfile']['tmp_name'];
$target_path = "/johncliffordtaylor.com/upload2/uploads/";
$target_path = $target_path . basename($_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target_path))
{
echo "The File". basename($_FILES['uploadedfile']['name']).
"has been uploaded";
}
else
{
echo "There was an error uploading your file please try again. And remember that all uploaded files need to be under 50 megs.";
}
?>

```

Any help would be greatly appreciated
