When trying to access the $_FILES array, PHP returns the error "Undefined index: picture". In my php.ini file, File Uploads are turned on, and any user can write in the /tmp directory. In the HTML form, enctype is set to "multipart/form-data". Interestingly enough, the basename for the uploaded file prints so I believe that PHP has actually seen the file, but has some problem uploading it. Can someone provides suggestions on potential solutions to this problem? By the way, I am using PHP5.
PHP Dosyadan Snippets
echo "Picture=" . $_POST['picture'] . "<br/>";
$uploadedPic = $_FILES['picture']['tmp_name'];
HTML Form
<form action="PHPFile.php" method="post" enctype="multipart/form-data">
<p> Picture </p>
<input type = "file" id="picture" name="picture"/>
</form>