It's possible this belongs in the PHP forum, but I don't think my error is PHP-related. Feel free to correct me if I'm wrong. This may be a somewhat rambling post, and I apologize in advance.
I'm working on a form so our data entry department can load datasets into mySQL. On the form, each row has 20 columns, all of which are single lines of text or dropdown boxes. There aren't any multi-line textfields, file uploads or anything like that, so it isn't really a lot of data.
Using PHP to help generate the form, it starts off with 20 blank rows (similar to a small spreadsheet). In addition, once some rows are entered, whenever someone comes back to edit the dataset, you get 20 more blank rows. This is setup by a simple for($i=0;$i<20;$i++)
The largest dataset that has been entered thus far has been about 15 rows, and I'd say that 10 ~ 20 rows would end up being the average that someone would input.
However, now I have a problem. We just had a somewhat larger dataset come in that we needed to enter. It's about 35 rows. The data entry person entered some of the data, but when they went back to edit it and enter some new rows, it won't save. I turned on the PHP and mySQL errors and haven't had any issue there.
I added print_r($_POST) and found that my "Save" submit button wasn't posting its value. After more study, with 35 rows of data, and 20 blank rows, I should be posting 55 total rows, so I'd expect my last array element to be numbered 54 since it starts with zero.
However in the POST array, the first 10 or so fields have array elements up to 52, and the next 10 or so fields only have array elements up to 51.
For testing purposes, I adjusted the number of blank rows that should be added to the bottom of the form up to 100 and re-loaded the page. I do get 100 blank rows on my screen after the 34 rows that have been entered, but when I submit the page and view the $_POST data, instead of the 134 elements I'd expect, it still only shows that I posted up to element 52.
I think the error is definitely dependent on the number of rows as opposed to any data validation errors, because i can adjust the form to only have 3 blank rows after the data set, and it'll post all 37 form elements just fine without issue and save the data. Element 51~52 seems to be the cutoff.
Any suggestions? Does this post make a bit of sense? Is there a maximum post size as far as the number of elements? In PHP I tried setting memory_limit to 512M and post_max_size to 400M (which is WAY more than I'd need) and no change, so I'd think it has something to do with the HTML elements or Apache's config. If a snippet of the data would be helpful, please let me know.