PHP Form Sumission - strange behavior - variable not passed

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Vacman
Forum Newbie
Posts: 8
Joined: Fri Jan 22, 2010 7:13 pm

PHP Form Sumission - strange behavior - variable not passed

Post by Vacman »

I have a large form with about 600 text boxes, checkboxes, etc on it (seems large, but all fits nicely with minimal scrolling).
Data is pulled from a MySQL DB and form is populating as expected.

Here is where it gets weird. When I submit the form, only about half the data is POSTed. I am not using GET, so I am not getting the URL error.
The data simply does not show up on the called php file where the data would be updated to the DB.

My question is this; Is there a reason to suspect bad html table design as to why this is happening, or does table design have any bearing on my problem?
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: PHP Form Sumission - strange behavior - variable not pas

Post by social_experiment »

It could be a limitation by the post_max_size setting in the php.ini file. What is it getting limited to, 200?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
phphelpme
Forum Contributor
Posts: 261
Joined: Sun Nov 21, 2010 3:32 pm

Re: PHP Form Sumission - strange behavior - variable not pas

Post by phphelpme »

I agree with social here, I would personnally suggest trying to split your form up into multiple parts which would in turn make is easier for the person who has to input the data also because you could change X amount of values and your browser crashes and you have to enter all the values again.

Reduce your fields over a multi-form to reduce the risk of stress. :)

Best wishes
Vacman
Forum Newbie
Posts: 8
Joined: Fri Jan 22, 2010 7:13 pm

Re: PHP Form Sumission - strange behavior - variable not pas

Post by Vacman »

Will look into the post_max_size issue and report back tonight when I get home. As far as the multi form option, unfortunately that isn't possible as this is a real time hockey scoring form for in-game use. I will report back and let you guys know what I find.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: PHP Form Sumission - strange behavior - variable not pas

Post by califdon »

Never say that something isn't possible unless you've really thought it through. I've seen that statement used many times (even by me a few times!) and seen it blind the person to the solution that actually solves the problem! Ask yourself WHY isn't it possible? Could you divide the form into several parts, each with its own Submit button? Could you use AJAX to update small parts of the form? There are always options. Refusing to consider them creates a mental blockage that is not your friend!
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: PHP Form Sumission - strange behavior - variable not pas

Post by social_experiment »

califdon wrote:There are always options. Refusing to consider them creates a mental blockage that is not your friend!
Ditto.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
phphelpme
Forum Contributor
Posts: 261
Joined: Sun Nov 21, 2010 3:32 pm

Re: PHP Form Sumission - strange behavior - variable not pas

Post by phphelpme »

califdon wrote:Refusing to consider them creates a mental blockage that is not your friend!
Could not have said it better myself.

Best wishes
ashiland
Forum Newbie
Posts: 18
Joined: Sat Jul 16, 2011 5:19 am

Re: PHP Form Sumission - strange behavior - variable not pas

Post by ashiland »

is it solved or what? did it have to do with post_max_size?
ashiland
Forum Newbie
Posts: 18
Joined: Sat Jul 16, 2011 5:19 am

Re: PHP Form Sumission - strange behavior - variable not pas

Post by ashiland »

by the way, where may I edit this php.ini?
thanks.
phphelpme
Forum Contributor
Posts: 261
Joined: Sun Nov 21, 2010 3:32 pm

Re: PHP Form Sumission - strange behavior - variable not pas

Post by phphelpme »

It should be located in the public_html directory. If it's not there, you can install it by going through the PHP Config menu. The PHP configuration file can be in multiple locations. Additionally, you may find that you have multiple instances of the php.ini file.

Might be wise to tell us whether this is a remote server or localhost server, what versions, or what software you are using to run a server and also if you are using such things as cpanel etc.

Best wishes
Post Reply