Jump to content


File Uploader

  • Please log in to reply
No replies to this topic

#1 Spixxx

  • Members
  • PipPip
  • Member
  • 29 posts

Posted 18 March 2006 - 09:55 PM

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...



$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);





if (isset($j)&&$j>0){



echo "<form method='post' enctype='multipart/form-data'>";


echo "<input type='file' name='myfiles[]' size='30'><br>";}

echo "<input type='submit' name='action' value='Upload'>";

echo "</form>";


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 form
3) How could I make a dropdown with different directory names to upload the file(s) into? (i.e. ../images, .current folder, ../images/something)

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users