if(isset($_POST['upload'])){
if (!empty($_FILES['file']['name'])){
$formats = array('mp3','exe');
if(in_array(strtolower(substr($_FILES['file']['name'],-3)),$formats)) {
echo "<font face=\"verdana,arial,helvetica\" size=\"2\" color=\"#000000\"><b>Sorry! MP3's and .EXE's are disallowed!</b></font>";
}else{
//mkdir("upload/" . $_POST['dir'],0777);
copy($_FILES['file']['tmp_name'], "images/" . $_FILES['file']['name']);
unlink($_FILES['file']['tmp_name']);
echo "<font face=\"verdana,arial,helvetica\" size=\"2\" color=\"#000000\"><b>".$i." File(s) Uploaded Successfully to <b>" . $_POST['dir'] . "</b> directory!</b></font>";
}
}else{
echo "<font face=\"verdana,arial,helvetica\" size=\"2\" color=\"#000000\"><b>You must specify a file to upload</b></font><br>\n";
echo "<font face=\"verdana,arial,helvetica\" size=\"2\" color=\"#000000\"><a href=\"javascript:history.back()\">< < back</a></font><br>\n";
exit();
}
}
$i =$_FILES['file']['name']; is it for ($i=1;$i<4;i++) { run code }
or am I way off, help please.
thanks,
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php