File Upload...gerr!

Hi all, I’m starting to pull out my hair, I can’t fathom out for the life of me why my file upload script isn’t working, it’s just not uploading. Just keep getting the message: Sorry, there was a problem uploading your file.

Any help and advice is appreciated as always :slight_smile:

<?php
//Script to Upload Images

if(isset($_POST['submitted'])){

 $target = "../uploads/"; 
 $target = $target . basename( $_FILES['uploaded']['name']) ; 
 $ok=1; 
 if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) 
 {
 echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
 } 
 else {
 echo "Sorry, there was a problem uploading your file.";
 }

}
?>


<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
File <input  type="file" name="upload" />
<input type="submit" name="submitted" value="Upload" />
</form>

Hey guys, quick update, all working good now, I didn’t change the folder permissions. Did not realize this was necessary on local! Cheers anyway :smiley: