Multiple file upload in PHP


<!—————————————————

<?php
if($_POST[“submit”] == “submit”)
for($i=0;$i<count($_FILES[“ss”][“name”]);$i++){
move_uploaded_file($_FILES[“ss”][“tmp_name”][$i],getcwd().’/’.$_FILES[“ss”][“name”][$i]);
}
?>
<form action=”” method=”post” name=”files” enctype=”multipart/form-data” >
<input type=”file” multiple name=”ss[]” value=”” />
<input type=”submit” value=”submit” name=”submit” />
</form>

——————————————————————>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s