I have a File Upload Form which looks like this:

HTML Code:
<form action="./upload.php" method="post" enctype="multipart/form-data">
  <strong>File Location:</strong>
  <input type="file" name="userfile" id="file">
  <br />
  <strong>  Version:</strong>
  <input name="version" type="text" size="10" />
<br />
<br />
<input type="submit" value="Upload File">
What I am attempting to do is put together the PHP Code so that it processes the file, placing it into a temporary directory, pending approval from a Moderator. Once the user submits the file on the website, I need the page to re-direct to another page which shows the status on that pending file.

This is what I've put together so far:

PHP Code:
= array('.txt');
$max_filesize 524288;
$upload_path './files/';
$filename $_FILES['userfile']['name'];
$ext substr($filenamestrpos($filename,'.'), strlen($filename)-1);
'Your attachment has been rejected due to an unaccepted filetype.');
filesize($_FILES['userfile']['tmp_name']) > $max_filesize)
'The file you attempted to upload is too large.');

'You cannot upload to the specified directory, please CHMOD it to 777.');
move_uploaded_file($_FILES['userfile']['tmp_name'],$upload_path $filename))
'Success! Your Guide is pending approval from the Moderator. <a href="' $upload_path $filename '" title="Your File">here</a>';
'Rejected. Please try again or contact the Administrator if the problem persists.';
Anyone know of any scripts or tutorials that does something like this?