hey guys,

I have an html form to upload a file to be used and an external php script, as shown below, the problem is that when I try to pull the file into the script, it doesn't come up.

HTML Code:
<html>
<body>
<form action="upload.php" action="post" enctype="multipart/form-data">
<label><input type="file" name="file" id="file"/> 
<input type="submit" name="fileSubmit" id="fileSubmit"/></label></form>
</body>
</html>
here is upload.php:

PHP Code:
$filename $_FILES['file']['tmp_file'];

$file file($filename);

$output fopen("output.txt","w+");

foreach(
$file as $line){
fwrite($output,$line."\n");
}

fclose($file);