maximum number of variables which maybe passed to a php file

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
rhaynes
Forum Newbie
Posts: 18
Joined: Mon Nov 08, 2004 8:32 am

maximum number of variables which maybe passed to a php file

Post by rhaynes »

Hi, I have been working on a series of pages (thanks to everyone who has helped so far) which would allowed me to bulk update a database. A query is made and all rows which match the search criteria are displayed with a subset of fields placed in input text boxes on a html page. Some of the boxes are then edited. All the quantities are stored in arrays (there are 10 editable boxes for each of say 400-500 rows). So that would 4000-5000 quantities which are then passed to a php page which loops over all entries and does a update of the database. Is this asking too much? The form is generated by a method=get.

I could have a typo in my code, but when I hit the submit button at the end of the html form nothing happens, it doesn't seem to even call the php page at all. So I was wondering if this is coding error on my part or if this is due to the number of variables I am passing.

Any suggestion would be greatly appreciated.

R Haynes
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

i dont think there is any maximum number, but i know in php.ini there is a max POST size(2mb default), and max memory limit(8mb default)

how is the form submitted? i know you said generated by GET, but are you submitting the form via GET as well?

if so, i dont know if i would do that. i dont think the http spec sets a limit on how long a url can be, but that sounds like a lot of info., and i know there was a time when it was common practice to avoid urls over 256 chars i think. i know ive seen urls much longer than that, but i think this would be more suited to using POST to submit the data


but that aside, have you checked the html and made sure its no tmalformed? (like closing all html tags properly)

are you escaping quotes properly?
if not this could happen:

Code: Select all

<input value="hello, my name is "rehfeld" and i just screwed the html by having quotes in quotes">


how many mb is the resulting html page from this data dump?

and, may i ask, why your using a form to do this? im curious :)
rhaynes
Forum Newbie
Posts: 18
Joined: Mon Nov 08, 2004 8:32 am

amount of information passing

Post by rhaynes »

rehfeld wrote:i dont think there is any maximum number, but i know in php.ini there is a max POST size(2mb default), and max memory limit(8mb default)

how is the form submitted? i know you said generated by GET, but are you submitting the form via GET as well?

if so, i dont know if i would do that. i dont think the http spec sets a limit on how long a url can be, but that sounds like a lot of info., and i know there was a time when it was common practice to avoid urls over 256 chars i think. i know ive seen urls much longer than that, but i think this would be more suited to using POST to submit the data


but that aside, have you checked the html and made sure its no tmalformed? (like closing all html tags properly)

are you escaping quotes properly?
if not this could happen:

Code: Select all

<input value="hello, my name is "rehfeld" and i just screwed the html by having quotes in quotes">


how many mb is the resulting html page from this data dump?

and, may i ask, why your using a form to do this? im curious :)
Hi, thanks for the response... I changed to the Post method and all is well, it must be the url length.

Cheers:)
R Haynes
Post Reply