Page 1 of 1

Undefined index??

Posted: Fri May 23, 2003 8:43 am
by jiehuang001
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;
?>

Posted: Fri May 23, 2003 8:52 am
by Wayne

Code: Select all

$filename = $HTTP_POST_FILES&#1111;'file_name']&#1111;'name'];
you might want to read the manual about file uploads to get the rest of the functionality.