can one set post_max_size in form?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I dont have access to my php.ini file so I am trying the following
which doesn't seem to work:

       <input type=hidden name=post_max_size value=100000>

I know it can be done for file uploads, but can it be done for posting

Re: can one set post_max_size in form?

If you're using Apache, you can try setting LimitRequestBody to the
desired limit in bytes. For example: "LimitRequestBody 100000". This is
available in .htaccess as well as the global configuration. See

You can also try setting PHP's post_max_size directive in apache if
php.ini is off-limits. For example: "php_value post_max_size 100000".

Another option is to use client-side browser validation. You can set
the maxlength attribute on a text field or use javascript to check the
length of a textarea before submitting. These limits could be bypassed
by a user determined to do so however. An example of client-side input
length checking:

<script type="text/javascript">
// Don't allow more than length chars
function checkTextareaLen(textarea, length)
  if (textarea.value.length > length) {
    textarea.value = textarea.value.substring(0, length)

<form method=post>

  <input name=text1 maxlength=5>  <!-- Browser should limit text1 to 5
chars -->

  <textarea name=text2
    onKeyDown="checkTextareaLen(this, 20)"
    onKeyUp="checkTextareaLen(this, 20)"
    onChange="checkTextareaLen(this, 20)"

  <input type=submit>


See here for a more advanced script that allows you to set maxlength on
textarea elements:

Best Regards,

John Peters wrote:
Quoted text here. Click to load it

Site Timeline