I want to make it so when uploading multiple files to a target folder you don't only have one choose file option, but rather multiple choose file options to upload as many as needed at once. It targets a folder within it's directory and when I have one choose file input it works, but when more are added it doesn't work. Here is my code so far.
<html>
<head>
<?php
if(isset($_POST['Submit']))
{
$file_name = $_FILES['audio_file']['name'];
if($_FILES['audio_file']['type']=='audio/mpeg' || $_FILES['audio_file']['type']=='audio/mpeg3' || $_FILES['audio_file']['type']=='audio/x-mpeg3' || $_FILES['audio_file']['type']=='audio/mp3' || $_FILES['audio_file']['type']=='audio/x-wav' || $_FILES['audio_file']['type']=='audio/wav')
{
$new_file_name=$_FILES['audio_file']['name'];
$target_path = "audiofiles/".$new_file_name;
if(move_uploaded_file($_FILES['audio_file']['tmp_name'], $target_path)) {
}
}
}
?>
</head>
<body>
<form name="audio_form" id="audio_form" action="" method="post" enctype="multipart/form-data">
<fieldset style="height: 23vh; width: 50vw;">
<input name="audio_file" id="audio_file" type="file" style="position: fixed; top: 2vh;">
<input name="audio_file" id="audio_file" type="file" style="position: fixed; top: 7vh;">
<input name="audio_file" id="audio_file" type="file" style="position: fixed; top: 12vh;">
<input name="audio_file" id="audio_file" type="file" style="position: fixed; top: 17vh;">
<input name="audio_file" id="audio_file" type="file" style="position: fixed; top: 22vh;">
<input type="submit" name="Submit" id="Submit" value="Submit" style="position: fixed; top: 30vh;">
</fieldset>
</form>
</body>
</html>