Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


MurrayM

2502 posts

Uber Geek
+1 received by user: 742

ID Verified
Trusted
Lifetime subscriber

#116039 16-Apr-2013 16:05
Send private message

Can anyone tell me what the maximum length of an HTML form field "name" attribute is?

What I've discovered is that this form field is ok:

<input name="1234567890123456789012345678901234567890123456789012345678901234" type="text" size="30" maxlength="30" value="">

But that this isn't ok:

<input name="12345678901234567890123456789012345678901234567890123456789012345" type="text" size="30" maxlength="30" value="">

The difference is that the first example has a Name attribute that is 64 characters long and the second has a Name attribute that is 65 characters long.

On a web server that I use that's running Apache 2.2.3 the first works and the second fails, so it looks like the maximum length you can have is 64 characters.  But on another web server that I use that is running Apache 2.2.4 both examples work ok.

I've tried looking on the Apache site to see if this is specified anywhere but I'm not familiar with the site and I can't seem to find any documentation about this.  Can anyone comment?

Create new topic

This is a filtered page: currently showing replies marked as answers. Click here to see full discussion.

ubergeeknz
3344 posts

Uber Geek
+1 received by user: 1041

Trusted
Vocus

  #800292 16-Apr-2013 16:09
Send private message

Could it be that the POST data is exceeding some limit, rather than anything to do with the form itself?

edit: it seems to be related to some security packages, eg. Suhosin, which makes sense.  Why do you want to use a name longer than 64 chars anyway?

Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.