Location: PHPKode > projects > Download Manager > doupload.php
<?php
include_once("config.php");

print "<title>".$title."</title>";
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"bswstyle.css\">";
include('header.php');
print "<table align=\"center\">";
print "<tr><td class=\"topic\" align=\"center\"><a class=\"bar\"href=\"index.php\">"."Return to Main Page"."</a></td></tr><tr><td>";
$i=0;

$descrip=$_POST['description'];
$fname=$_POST['fname'];
$cat=$_POST["cat"];
$file_dir = "uploads/";
$ip=$_POST['ip'];

foreach($_FILES as $file_name => $file_array) {
	echo "path: ".$file_array["tmp_name"]."<br/>\n";
	echo "name: ".$file_array["name"]."<br/>\n";
	echo "type: ".$file_array["type"]."<br/>\n";
	
	echo "size: ".$file_array["size"]."<br/>\n";

	if (is_uploaded_file($file_array["tmp_name"])) {
		move_uploaded_file($file_array["tmp_name"], "$file_dir/".$file_array["name"]) or die ("Couldn't copy");
		echo "Done!<br/>";
	}
}
$image=$file_dir.$file_array["name"];
$ip = getenv("REMOTE_ADDR");
mysql_query("insert into uploads (files,fname,category,ip,updated,description) values('$image','$fname','$cat','$ip',now(),'$descrip')",$mysql);
mysql_close($mysql);
print "</td></tr>";


print "<tr><td class=\"topic\"><a href=\"uploader.php\">"."Would You like to upload another file?"."</a>"."</td></tr>";

print "</table>";




 // }
	//else{header("location:uploader.php?id=$id&secure=1");
	//}
	
//print "<script>"."location=\"index.php\";"."</script>";
include('footer.php');
?>
Return current item: Download Manager