what's wrong with my code it doesnt upload
<?php
if($_POST['uploadedfile'] != NULL)
{
$targetPath = "uploads/";
$targetPath = $targetPath . basename($_FILES['uploadedFile']['name']);
if(move_uploaded_file($_FILES['uploadedFile']['tmp_name'],$targetPath))
echo("The file " .basename($_FILES['uploadedFile']['name']. " has been uploaded"));
else
echo("There was an error please try again");
}
?>
heres my form
<form name = "uploadFile" enctype = "multipart/form-data" method = "POST">
<input type = "hidden" name = "maxSize" value = "1000000">
Choose a file to upload :
<input type = "file" name = "uploadedfile">
<input type = "submit" value = "Post File">
<input type = "button" name = "exit" value = "Close Window" onClick = "window.close()">
</form>
im just new to this and also im using xampp as my localserver and under htdocs i created a folder named uploads am i doing it ryt?