472,142 Members | 1,332 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 software developers and data experts.

input element of type file not reading file names after 20 file elements

289 100+

The strange problem i am having is,

the input element of type='file' not reading file names after 20 file elements. It simple returns null on reading the 'name' of file.

The code is simple and has no error as I am testing it standalone

Expand|Select|Wrap|Line Numbers
  2. <form action="testfile.php"  method="post"
  3. enctype="multipart/form-data">
  4. 1<input type="file" name="userfile1" id="userfile1"  size="13"/>
  5. 2<input type="file" name="userfile2" id="userfile2"  size="13"/>
  6. 3<input type="file" name="userfile3" id="userfile3"  size="13"/>
  7. 4<input type="file" name="userfile4" id="userfile4"  size="13"/><br/>
  8. 5<input type="file" name="userfile5" id="userfile5"  size="13"/>
  9. 6<input type="file" name="userfile6" id="userfile6"  size="13"/>
  10. 7<input type="file" name="userfile7" id="userfile7"  size="13"/>
  11. 8<input type="file" name="userfile8" id="userfile8"  size="13"/><br/>
  12. 9<input type="file" name="userfile9" id="userfile9"  size="13"/>
  13. 10<input type="file" name="userfile10" id="userfile10"  size="13"/>
  14. 11<input type="file" name="userfile11" id="userfile11"  size="13"/>
  15. 12<input type="file" name="userfile12" id="userfile12"  size="13"/><br/>
  16. 13<input type="file" name="userfile13" id="userfile13"  size="13"/>
  17. 14<input type="file" name="userfile14" id="userfile14"  size="13"/>
  18. 15<input type="file" name="userfile15" id="userfile15"  size="13"/>
  19. 16<input type="file" name="userfile16" id="userfile16"  size="13"/><br/>
  20. 17<input type="file" name="userfile17" id="userfile17"  size="13"/>
  21. 18<input type="file" name="userfile18" id="userfile18"  size="13"/>
  22. 19<input type="file" name="userfile19" id="userfile19"  size="13"/>
  23. 20<input type="file" name="userfile20" id="userfile20"  size="13"/><br/>
  24. 21<input type="file" name="userfile21" id="userfile21"  size="13"/>
  25. 22<input type="file" name="userfile22" id="userfile22"  size="13"/>
  26. 23<input type="file" name="userfile23" id="userfile23"  size="13"/>
  27. 24<input type="file" name="userfile24" id="userfile24"  size="13"/>
  28. <input type="submit" name="submit" value="Submit" />
  29. </form>
On Submit Button, the following code is executed in testfile.php

Expand|Select|Wrap|Line Numbers
  1. for($i=1;$i<=24;$i++){
  3. echo "File to Upload: " . $_FILES["userfile".$i]["name"] . "<br />";
  4. }
Is this related to php5.ini configurations. But its settings related to file are

Expand|Select|Wrap|Line Numbers
  1. engine = On
  2. file_uploads = On
  3. upload_max_filesize = 1M
  4. post_max_size = 180M
  5. max_execution_time = 80
  6. allow_url_fopen = On
  7. user_agent="PHP"
  8. default_socket_timeout = 60

Any suggestions ?
Jun 11 '10 #1
1 2035
289 100+
OK ignorant me.

"max_file_uploads" parameter controls the number of files you can upload. Changed its value in php5.ini file
Jun 11 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Neil Zanella | last post: by
2 posts views Thread by Jim Witte | last post: by
1 post views Thread by Rob Griffiths | last post: by
1 post views Thread by Rob Mitchell | last post: by
2 posts views Thread by yawnmoth | last post: by
6 posts views Thread by libsfan01 | last post: by
4 posts views Thread by Pasquale | last post: by
7 posts views Thread by Ed Jay | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.