473,881 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

289 Contributor

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 2150
289 Contributor
OK ignorant me.

"max_file_uploa ds" 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

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 make the document comply: <input checked="checked" type="radio" name="foo" value="bar" />FooBar
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 automate a process on an existing system. Jim Witte jswitte@bloomington.in.us
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 Framework are said to have an element type. http://java.sun.com/docs/books/jls/second_edition/html/arrays.doc.html
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 input elements in a form. I'm trying to just hide all the form input elements
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. something like... <input onkeyup="if (this.value.length == this.maxlength) document.forms.elements.focus()" value="whatever" maxvalue="x" type="text" /> <input value="whatever" maxvalue="x" type="text" />
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
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 fine and detects if the select menu isn't selected with a value, but I keep getting 'undefined' for the radio element type. I've almost pulled out half a head of hair wondering why. Any experienced eyes see something I don't? Thanks, Pasquale
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. But none of them work on IE. This works in every browser I've tried besides IE: var whatever = document.createElement( 'input' ); whatever.type = 'text'; // (more code)...
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; document.getElementById(target).innerHTML = "<input type = 'file' name="+eName+" value=''>text"; }
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 (remove 'M' to respond by email)
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.