Search code examples
phparraysstringpostsuperglobals

Textarea Cutoff in PHP $_POST array


My textarea on a webform [using POST method] is getting cutting off at 1024 characters.

The field does not have a max length attribute set and will allow over 1024 characters to be entered. However, when I view the $_POST array in Eclipse and try to insert into Database, I can see it is not the entirety of the user's input.

What is the root cause of this issue? Is there an inherent limitation that I am unaware of? I can't seem to find any documentation on this issue. Any advice is greatly appreciated.


Solution

  • There was not a limitation in the database after all. The 'variable' window in Eclipse will only show a maximum of 1024 characters, per field, which is what threw me off. There were other issues with my insert statement that made me think that the Eclipse limitation was the root; however, after using @George Brighton's suggestion of print_r($_POST), I realized my error.