Actually when i create dynamically a new input field whose type is file using jquery and submit it it don't send any thing on the receiving side. Please help me in this
This is jQuery code
$(document).ready(function(){
$('#add').click(function(){
var str = '<input type="file" name="file[]">';
$('#file').append(str);
});
});
This is HTML code
<button type="button" id="add">Add</button>
<form id="" action="test.php" method="POST" enctype="multipart/form-data">
<div id="file">
<input type="file" name="file[]">
</div>
<button type="submit">Submit</button>
</form>
This is PHP code
var_dump($_FILES);
var_dump($_POST);
And this is php out put output