Junaid Tariq
Junaid Tariq

Reputation: 261

PHP form submitting all data but when i get its not complete data

it might seem weird but i have a strange problem. when i submit a form and check the request from network console of chrome developer tool it shows all the data is submitted but when i get that data in my update file it won't show all the data. the data is submitted as array. like i have below input field in form. total of 330 field we have with the same name and when we add new dynamic field and put data into it and then submit it won't save.

<input type="text" name="txtOptions[]" id="txtOption<?= $i ?>" value="<?= formValue($sOption) ?>" maxlength="100" size="25" class="textbox title" />

when is get on server side and print the data it won't show all the data.

$sOptions          = IO::getArray("txtOptions");
print_r("<pre>");
print_r($sOptions);
print_r("</pre>");
exit();

I've tried hard to find out what's going on there is hidden field in my form of MAX_FILE_SIZE. I also try to change the value of this and make it more but nothing happen

 <input type="hidden" name="MAX_FILE_SIZE" value="10485760" />

This only happening on live server not on localhost. any idea. sorry for not to be clear of my question but this is what i have first time in my life.

The IO::getArray are the custom classes functions.

Upvotes: 1

Views: 77

Answers (1)

Junaid Tariq
Junaid Tariq

Reputation: 261

i've found the solution. Actually i have above 1000 input variables in my form which is been generated dynamically and in my php.ini the max_input_vars has been set to 1000 only,that's why i was getting only 1000 input variable values not more than that.

i had no idea that the issue will be the number of input variables. I thought it might be an issue of file size.

Upvotes: 1

Related Questions