Page 1 of 1

Maximum number of parameters to pass?

Posted: Mon Apr 27, 2009 3:13 am
by toughman
I have a script needs to pass parameters to itself after user clicks a button in order to add more records. However, the number parameters to pass will getting bigger if the user trys to add more records.

Ex. http://www.abc.com/record.php?a1=xxx&b1 ... b2=yxy&a3=........

My script works when the number of the parameters is under 68 but it doesn't work when it is 72.

It will show the error message: "Internet Explorer cannot display the webpage"

Can anyone please tell me why and how to overcome this problem?

Thanks,

Roger

Re: Maximum number of parameters to pass?

Posted: Mon Apr 27, 2009 3:40 am
by toughman
Sorry.

I found my problem. The maximum length of a URL in Internet Explorer is 2,083 characters.

If more than 2083, use post.

<form action="myscript.php" method="POST">
...
</form>

Re: Maximum number of parameters to pass?

Posted: Mon Apr 27, 2009 10:05 am
by pickle
I really think you need to re-think you're approach. If a user is adding a field, why not just have that one field to be added in the URL, rather than all fields they've ever added?