Undefined index??
Posted: Fri May 23, 2003 8:43 am
I used the following two files trying to do a file uploading. While I just tried to output the file name, I got this error "Notice: Undefined index: file_name".
Please let me know what wrong I made.
-------------------UploadNew.php---------------------
<form action="upload.php" method="post" enctype="multipart/form-data">
<p>Upload file: <input type="file" name="file_name"></p>
<P><input type="submit" value="Upload"></p>
</form>
---------------upload.php-------------------
<?php
$conn = OCILogon("scott", "tiger", "DbName");
$filename = $_POST['file_name'];
print $filename;
?>
Please let me know what wrong I made.
-------------------UploadNew.php---------------------
<form action="upload.php" method="post" enctype="multipart/form-data">
<p>Upload file: <input type="file" name="file_name"></p>
<P><input type="submit" value="Upload"></p>
</form>
---------------upload.php-------------------
<?php
$conn = OCILogon("scott", "tiger", "DbName");
$filename = $_POST['file_name'];
print $filename;
?>