Arrays being posted in forms
I have a form that basically lists out a 26 week timetable (182 days). Each day allows a user to select 5 different drop down menus.
The drops downs are named like as follows:
When I use the $_POST['morning'] for example and then perform a print_r on this, I get 182 values. Thats what I want
The problem is, if I add more drop downs, for some reason, the number of values returned in each array falls (i.e. only 162 values - so the last 20 are missed). I have no idea how to fix this. Does it sound more like a memory issue
bookmarked this thread as it sounds interesting.
You should have a look at the following directives in your php.ini (possibly putting them here as well for review)
From the sounds of it, its probably the first one (max-input-vars) though. Hope that helps!
Thanks for the help.
I have heard people talk about the .ini file many times.
I am currently hosting the site with a 3rd party. I cant see the .ini file in any of the directories, is this something they would have to change?
That depends on your host, some allow you to use a php.ini on a per directory basis by just putting one in the root. For example, on my customer's server it didn't have a php.ini file in his folder to begin with, but we created one and uploaded it and all worked well. You'll have to check with your host about that.
Have you thought about breaking up the form into multiple parts? A form with 500+ inputs seems a little overwhelming for a user.
This issue has been SOLVED. The max var limit was set to 1000. I simply uploaded a php.ini file to my main directory and changed this to 2000. Everything works well now.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)