473,385 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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

Coldfire
289 100+
Hi,

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
  1.  
  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>
  30.  
  31.  
On Submit Button, the following code is executed in testfile.php

Expand|Select|Wrap|Line Numbers
  1. for($i=1;$i<=24;$i++){
  2.  
  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 2122
Coldfire
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

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

Similar topics

8
by: Neil Zanella | last post by:
Hello, I would like to know why the W3C decided not to make the following valid XHTML: <input checked type="radio" name="foo" value="bar" />FooBar forcing people to write the following to...
2
by: Jim Witte | last post by:
Hi, How do I set a file input element? If it's a text input, I can set the value property. But this doesn't work with file inputs. And no, I can't change it - I'm writing a script to...
1
by: Rob Griffiths | last post by:
Can anyone explain to me the difference between an element type and a component type? In the java literature, arrays are said to have component types, whereas collections from the Collections...
1
by: Rob Mitchell | last post by:
(Sorry if this appears twice) Hi, I know this has probably been beaten to death but I was working with Class by Stickman -- http://www.the-stickman.com which uses DOM to create multiple file...
2
by: yawnmoth | last post by:
Say I have two input elements and that I wanted to make it so that when the first ones input was what it should be, the focus would automatically be shifted to the next input element. ie....
6
by: libsfan01 | last post by:
hi all! is it possible to change an element type with javacript for example onclick to change a text box to a hidden element or to a textarea? kind regards marc
4
by: Pasquale | last post by:
I am using the JS and HTML code below to check that required fields are completed for attributes of a product. The first attribute is a select menu and the second is a radio set. My JS goes through...
10
by: sbaker8688 | last post by:
My God, how on earth do you use javacript to change the text color of an input element, and have it work with IE??? I've tried numerous solutions. All of them work on browsers such as Mozilla. ...
2
by: Ed Jay | last post by:
I'm dynamically creating several form input elements: mValue = integer constant; for(var j = 0; j < mValue; j++) { target = "imgCn"+ j; eName = "myFile"; eName = eName+jj;...
7
by: Ed Jay | last post by:
I'm trying to validate a form's file input elements using javascript, but I'm getting nowhere. How can javascript test if a file has been selected using a file form input element? -- Ed Jay...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.