Why are some post variables missing?

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
waxydock
Forum Newbie
Posts: 6
Joined: Mon Oct 12, 2009 7:16 am

Why are some post variables missing?

Post by waxydock »

Hi everyone,

Ive got a pretty simple question to ask, which has got me really confused.

I created a simple form, which has a large number of form fields (mostly simple text fields). When i submit the form to a page and print out the $_POST variable it only displays a certain number of the posted fields.. it leaves off the last 10 or so fields in the form.

Is there any reason why this would happen?

You can see the form thats giving me issues here: http://parampal.com/test.php

To see what values are posted just click the save button at the bottom of the form..

thanks for any help,

Waxydock
User avatar
markusn00b
Forum Contributor
Posts: 298
Joined: Sat Oct 20, 2007 2:16 pm
Location: York, England

Re: Why are some post variables missing?

Post by markusn00b »

Gee, that is strange. Is all you're doing a print_r($_POST)? I cannot see any reason, in the HTML, why the last six rows would not be sent.
waxydock
Forum Newbie
Posts: 6
Joined: Mon Oct 12, 2009 7:16 am

Re: Why are some post variables missing?

Post by waxydock »

yeap, all im doing is print_r($_POST); when the form is submitted...

does php have a limit on the number of form fields you can post?
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: Why are some post variables missing?

Post by superdezign »

Are you positive all of the input fields are in the <form> element?
waxydock
Forum Newbie
Posts: 6
Joined: Mon Oct 12, 2009 7:16 am

Re: Why are some post variables missing?

Post by waxydock »

The output for var_dump(ini_get('post_max_size')); was string(2) "8M" ... so im assuming that means the size is 8mb.. is that enough?

Yes im sure all my input fields are in the form tags... i double checked.

Ive attached the php file that im working with if it helps (if possible could someone try it on there server, there might be some limit on my server..)

thanks for any help guys.
Attachments
test.zip
(2.71 KiB) Downloaded 11 times
waxydock
Forum Newbie
Posts: 6
Joined: Mon Oct 12, 2009 7:16 am

Re: Why are some post variables missing?

Post by waxydock »

Ive taken a good look through cpanel and couldnt find anything to do with the size of POSTDATA...

Would you know if the code runs on your server?

:banghead: this is driving me nuts! lol

thanks for your help mate.
waxydock
Forum Newbie
Posts: 6
Joined: Mon Oct 12, 2009 7:16 am

Re: Why are some post variables missing?

Post by waxydock »

waxydock
Forum Newbie
Posts: 6
Joined: Mon Oct 12, 2009 7:16 am

Re: Why are some post variables missing?

Post by waxydock »

actually no, all i did was add a local version of the php.ini file on my server and refer to it in my .htaccess file (which i also just created).

My php.ini file is currently empty, is that ok? If not where can i find a default version of it (i really dont want to muck up my other code)

thx for your help.
Post Reply