I'm trying to create a script that will allow you to upload images to a directory on the server, and spit out an HTML file that displays all of the images in that directory. I'm new to php, so I know very little, but right now I'm working on the upload portion of the script. I've got enough to allow it to upload multiple images, but what I also want to place a drop down menu on the form. This drop down menu would allow you to select where you wanted the files uploaded, and place the files there. Is there anyone who knows how to go about doing this? Here's the code I have so far:
<?php
if ($imageFile !="none") {
for ($k =0; $k < count($imageFile); $k++) {
copy($imageFile[$k], "/home/heikou/public_html/test/$imageFile_name[$k]");
}
}
?>
<head>
<title>AvatarAdmin</title> </head>
<body>
<form action=<?php echo $PHP_SELF; ?> enctype="multipart/form-data" method="post">
<input type="file" size="40" name="imageFile[]"><br>
<input type="file" size="40" name="imageFile[]"><br>
<input type="file" size="40" name="imageFile[]"><br>
<input type="file" size="40" name="imageFile[]"><br>
<input type="file" size="40" name="imageFile[]"><br>
<input type="submit" name="submit" value="Add Images">
<input type="submit" value="Cancel" name="cancelit">
</form>
</body>