rendered paste body<?php
//absolute path.
$abs_path = "C:\wamp\www\billing\\";
//Makes sure submit is pressed.
if(isset($_POST['submit']))
{
$dir = trim($_POST['directory']);
$create_dir = mkdir($abs_path.$dir,0777);
if(!$create_dir)
{
die('Could not create directory.');
}
//Move files.
copy ($_FILES['imagefile']['tmp_name'][0], $abspath.$dir.'/'.$_FILES['imagefile']['name'][0]);
copy ($_FILES['imagefile']['tmp_name'][1], $abspath.$dir.'/'.$_FILES['imagefile']['name'][1]);
copy ($_FILES['imagefile']['tmp_name'][2], $abspath.$dir.'/'.$_FILES['imagefile']['name'][2]);
echo 'Your file has been uploaded.';
}
?>
<form method="POST" action="delete.php" enctype="multipart/form-data">
File:
<input type="file" name="imagefile[]" />
<br />
File:
<input type="file" name="imagefile[]" />
<br />
File:
<input type="file" name="imagefile[]" />
<br />
Artist:
<input type="text" name="directory" />
<input type="submit" name="submit" value="Submit">
</form>