using the code in this way look like it worked for me only thing now is how to make it look to see if the file type is right lol
Change: i used the form from the e-how site then used the codes for renaming but with the other part of it i just rename all the lines of codes with a "z" lol what in the end made it work but i recall that i try this before and it didnt work ...hmm idk but whatever it works
if you know of any better way to do this then plz tell
Code:
$ext = findexts ($_FILES['file']['name']) ;
$extz = findexts ($_FILES['filez']['name']) ;
$ran = rand () ;
$ranz = rand () ;
$ran2 = $ran.".";
$ran2z = $ranz.".";
$target = "upload/";
$target = "upload/";
$target = $target . $ran2.$ext;
$target = $target . $ran2z.$extz;
if(move_uploaded_file($_FILES['file']['tmp_name'], $target)) {
echo "The file has been uploaded as ".$ran2.$ext;
} else {
echo "Sorry, there was a problem uploading your file.<br>";
}
if(move_uploaded_file($_FILES['filez']['tmp_name'], $target)) {
echo "The file has been uploaded as ".$ran2z.$extz;
} else {
echo "Sorry, there was a problem uploading your file.";
}
|