I'm trying to create an html page that will allow file uploading. I'm just testing it out to see if everything is working. For now my script is just trying to output the file name.
echo $HTTP_POST_FILES['userfile']['name'];
i have also tried
echo $userfile_name
but... I get an error....
Notice: Undefined index: userfile in c:\inetpub\wwwroot\paducahbankcom\addFile.php on line 12
Here is my html form upload.php:
<html>
<head>
<title>This stupid thing does not work</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form method="post" action="addFile.php" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="1000">
Upload this file: <input name="userfile" type="file">
<br>
<input type="submit" value="send file">
</form>
</body>
</html>
And here is my script addFile.php
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
echo $HTTP_POST_FILES['userfile']['name'];
?>
</body>
</html>
What am I overlooking?
TIA