Justinas R.
Justinas R.

Reputation: 301

Getting not full $_POST array after form submission

On one HTML form I have over 200 hidden input fields. After form is submited I only get 99 hidden input values via $_POST.

Configured .htaccess file:

php_value max_execution_time 259200
php_value post_max_size 2000M
php_value upload_max_filesize 2000M

also checked if those actualy are set with ini_get().

What could be the problem? My last guess would be to ask my hosting providers to help / modify php.ini file, but unfortunately they don't answers support on weekends.

Upvotes: 0

Views: 1085

Answers (2)

StackSlave
StackSlave

Reputation: 10617

Look into php.ini max_input_vars. If you never touched it, you should be fine though.

See:

http://www.php.net/manual/en/info.configuration.php#ini.max-input-vars

All you would do to implement a higher number is create a php.ini file at your root directory, if it's not already there. Find max_input_vars or write it on a new line of its own. max_input_vars = 1000; is the default.

Make sure you also have a name attribute in all of your button and input HTML tag types that you want PHP to recognize, like:

<input type='hidden' name='someName' />
<button type='button' name='someButton'>Click Me</button>

Upvotes: 3

karlingen
karlingen

Reputation: 14645

First check if you are missing any Name attributes to your input elements.

<input type="text" name="NECESSARY_NAME" value="value" />

And also check your max_input_vars in php.ini

Upvotes: 1

Related Questions