Spixxx Posted March 18, 2006 Share Posted March 18, 2006 My friend posted about this and said his post was gone the next day...so I helped him with $i++;, but he never got this answered, and Im using the same script...[code]<?php$number="5";$directory ="upload/";if ($_POST){for ($i=0;$i<$number;$i++){if (trim($_FILES['myfiles']['name'][$i])!=""){$newfile = $directory.$_FILES['myfiles']['name'][$i];move_uploaded_file($_FILES['myfiles']['tmp_name'][$i], $newfile);$j++;}}}if (isset($j)&&$j>0){ACTION HERE}echo "<form method='post' enctype='multipart/form-data'>";for($i=0;$i<$number;$i++){echo "<input type='file' name='myfiles[]' size='30'><br>";}echo "<input type='submit' name='action' value='Upload'>";echo "</form>";?>[/code]Few questions: 1) What would "ACTION HERE" be if I wanted to echo a _blank link to each of the newly uploaded files?2) How could I make a form to specify a number 1-9, and use that in place of $number? And continue w/ rest of form3) How could I make a dropdown with different directory names to upload the file(s) into? (i.e. ../images, .current folder, ../images/something) Link to comment https://forums.phpfreaks.com/topic/5254-file-uploader/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.