I have following Form definition on PHP page:
<FORM action="formSave.php" method="post" enctype="multipart/form-data" data-ajax="false">
<!-- Some HTML controls here -->
<input type="file" name="foto" id="foto" />
</FORM>
formSave.php
:
foreach ($_POST as $key => $value) {
if($key=="foto")
{
echo "Photo attached: ".$_FILES["foto"]["name"];
}
}
But it does not print file name.
How can I use file upload in addition to data-ajax="false"
.
Please note that I am using data-ajax=false
for the first time in my life. I heard that it is used to enable/disable ajax call for mobile devices.