ankur patel
ankur patel

Reputation: 1

How to upload and insert multiple images in PHP?

I am new to php and i want solution for multiple images upload into php server.

I am using this way to multiple upload images file but getting issue when i multiple upload images.

<form enctype="multipart/form-data" action="upload.php" method="post">
    <input name="file[]" type="file" />
    <input type="button" id="upload" value="Upload File" />
</form>

<script>
$(document).ready(function(){
    $('.add_more').click(function(e){
        e.preventDefault();
        $(this).before("<input name='file[]' type='file' />");
    });
});
</script>

Upvotes: 0

Views: 805

Answers (1)

Maharjan
Maharjan

Reputation: 176

please add multiple attribute in input

<input name="file" type="file" multiple />

Upvotes: 2

Related Questions