I borrowed this from several different sources. The HTML code:
<form action="ImportTOA.php" method="POST" accept="text/csv">
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
Upload Daily TOA Logs: <br /><input name="userfile" type="file" onchange="this.form.submit()" />
</form>
and then, the PHP script:
$ImportFile = $_FILES['userfile']['name'];
For some strange reason, the form is not passing 'username' to the action file. What is the simple solution that I'm overlooking?