ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

How big is the HTML 'hidden' field?

(1/2) > >>

barney:
Folk,

I've searched this for a couple of days, but cannot find any definitive answer.

I need to make a comparison between a hidden field and a text area in order to determine whether to update a TEXT (BLOB) field in MySQL.

But I don't know, and cannot seem to discover, what limit might exist for the HTML hidden field.  I've found several discussions on setting the MAXLENGTH property, but none on the max of that property.

I'd prefer to compare the textarea and the hidden field for changes rather than make several requests to MySQL, on the theory that local system RAM is [usually] less expensive than the requests to the host.

Please offer any advice/comments on size limit(s), or even on procedure - I'm amenable to change, should that be warranted.

housetier:
can't you store a hash value in the hidden field and compare that with the new hash from the textarea? that way, you can easily store the data in the hidden field.

barney:
This will be PHP 4.x, so hashing is pretty much out of the question, as far as I know.  Don't know how large sha or md5 will go.  Mhash not available, as provider won't install it.  But, even with a hash, I still have the same question as to the length allowed, this time related to the hash capability.

Funny, never bothered me for years, but now I've just gotta know <chortle />.

While I'm not expecting any novels, there's a fair chance that some of the text area content could approach - maybe surpass - 64K in size, with one or two being even larger.

I wonder if it might be more effective to save the MySQL text field as a file, then do a compare with the textarea?  Not certain how CPU-/memory-intensive that might be, and it would definitely need to be server-side, a situation I'm trying to avoid.  Not certain I know enough JS to do that locally.

Only other alternative I can see at the moment is just to do an automatic update to the text field ... but that's another query call on the server, and there are already more than I'd like.  <Sigh /> PC-File was so much simpler <groan />.

housetier:
MD5 are 128bit or 16byte long, regardless of input size.

barney:
Yeah, I'm familiar with the output ... usually use it for passwords.  It's that, "...regardless of input size," that's bugging me.  Just as with the hidden HTML field, I have not found any mention of the upper limit(s).  I know the relative sizes of the MySQL text/blob fields, and can plan accordingly.  But w/o having some reference to the upper limits of the hidden field or to the hashing functionality, I'm just gambling.  Things only have to fail once in a commercial environment and my name is Mudd.

Navigation

[0] Message Index

[#] Next page

Go to full version