Location: PHPKode > projects > NetLink > netlink_os/upload.php
<h3>Upload a File</h3>

if ($submit)
	echo "Upload Stats:<br/>";
	echo "<blockquote style='font-size:10pt;'>";
	echo "Filename: ".$file_name;
	echo "<br/>File Type: ".$file_type;
	echo "<br/>File Size: ".$file_size;
	#now that the stats have been declared & displayed, now we process and upload the file
	$file_dest = "Users/$user/";
	$file_dest = $file_dest . $_FILES['filename']['name'];
	echo "<br/><br/>Copying $file_name....";
	echo "<br/>Moving copied file to $user's account...";
	echo "</blockquote>";
	if (move_uploaded_file($_FILES['filename']['tmp_name'], $file_dest))
  		print "File '$file_name' was successfully uploaded to account <b>$user</b>.<br/> ";
  	print "Possible file upload attack!  Here's some debugging info:\n";
echo "<hr color='#000000'/>";


<!--Display Upload Form-->
If you have a file, an image, or a document on your computer that you would like to display on your site, fill out the required form and click <b>Upload</b><br/><br/>
This function can upload Files, Images, <i>and</i> Documents.
<form method='post' action='?id=upload' enctype="multipart/form-data">
File Path: 
<input type='file' name='filename'/>
<input type='hidden' name="MAX_FILE_SIZE" value='102400'/>
<input type='submit' name='submit' value='Upload File'/>
Return current item: NetLink