I am stuck on trying to make this work, I have a html form that has file and text inputs, after submission I want to process these inputs through a loop in my php script. Currently the loop skips the file input and processes only the text inputs. I am new at php, and I cant seem to understand what is wrong and how to fix it. Here is the form code and the php code to process it.
<form action='loop.php' enctype="multipart/form-data" data-ajax="false" method="POST">
<input type ="text" name ="Input1"/>
<input type ="file" name ="Input2"/>
<input type ="text" name ="Input3"/>
<input type ="text" name ="Input4"/>
<input type='submit' data-corners="false" value ='submit'/>
</form>
loop.php
<?php
foreach ($_POST as $key => $value){
if($_POST[Input2]) //check if its the file input
{//some manipulation on the file}
else
//process all other text inputs}
?>
Thanks for your help
filesare in$_FILES, and posted data is in$_POST.$_FILESi am now able to access the files