Page 2 of 2
Posted: Thu Sep 21, 2006 10:29 am
by danharibo
But there is! Its part of the form, look:
stupid php
Posted: Thu Sep 21, 2006 11:23 am
by RobertGonzalez
Read up on
file uploads in PHP. There is something that is missing in your form that is shown in the example in that link I posted.
Posted: Thu Sep 21, 2006 11:41 am
by danharibo
Code: Select all
<form enctype="multipart/form-data" action="upload.php" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<!-- Name of input element determines name in $_FILES array -->
File to upload: <input name="uploadFile" type="file" />
<input type="submit" value="Upload File" />
</form>
<?
Still causes:
Notice: Undefined index: uploadFile in c:\program files\easyphp1-8\www\upload\upload.php on line 4
Notice: Undefined index: uploadFile in c:\program files\easyphp1-8\www\upload\upload.php on line 4
Notice: Undefined index: uploadFile in c:\program files\easyphp1-8\www\upload\upload.php on line 7
Notice: Undefined variable: uploadedfile in c:\program files\easyphp1-8\www\upload\upload.php on line 9
Posted: Thu Sep 21, 2006 12:06 pm
by RobertGonzalez
Just on a side note, are you checking if the form was posted anywhere in your code?
Posted: Thu Sep 21, 2006 12:35 pm
by danharibo
nevermind, fixed

Posted: Thu Sep 21, 2006 1:07 pm
by RobertGonzalez
What was the fix?