Re: [PHP] Re: best way to handle a form with 60 fields !!!

2001-12-03 Thread Krzysztof Kocjan



Fred wrote:

 Third, it is ineffecient and unneccessary to put 60 fields in a single form.
 If you are using the GET method it probably will not work since it passes
 the variable names and values in the URL, which has a maximum length of 255


In my mind maximum length 255 is not true. There isn't any limit for 
GET/POST requests as I read in RFC documents. The limit depends on Your 
web server implementation. I've never tested but suppose Apache could 
handle GET method with URL longer than 255 characters. I've never had 
problems with form's data length using Apache and GET/POST methods.
But if I'm wrong I apologize.

Krzysztof



-REKLAMA---
Juz w sprzedazy. Katalog Samochodowy AUTO TESTY 2002. 
Ceny i dane techniczne 1400 samochodow, 236 raportow z jazd,
testy porownawcze, wszystko o bezpieczenstwie.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: best way to handle a form with 60 fields !!!

2001-12-03 Thread Remigiusz Sokolowski

Krzysztof Kocjan wrote:

 
 
 Fred wrote:
 
 Third, it is ineffecient and unneccessary to put 60 fields in a single 
 form.
 If you are using the GET method it probably will not work since it passes
 the variable names and values in the URL, which has a maximum length 
 of 255
 
 
 
 In my mind maximum length 255 is not true. There isn't any limit for 
 GET/POST requests as I read in RFC documents. The limit depends on Your 
 web server implementation. I've never tested but suppose Apache could 
 handle GET method with URL longer than 255 characters. I've never had 
 problems with form's data length using Apache and GET/POST methods.
 But if I'm wrong I apologize.


This depends also on Your browser of course. AFAIK GET is OK for data up 
to 8kB, POST can be used for much bigger data




-- 
---/\--
Remigiusz Sokolowski  e-mail: [EMAIL PROTECTED]/  \  
-/\-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: best way to handle a form with 60 fields !!!

2001-12-02 Thread Fred

First, if your goal is to enter the form information into a database, there
is no need to ever register the form data as session variables.  Simply
insert the data into the database from the form and if you need some or all
of the data on other pages pull it back out of the database.

Second, it is never quicker or more efficient to store data in a file than a
database.

Third, it is ineffecient and unneccessary to put 60 fields in a single form.
If you are using the GET method it probably will not work since it passes
the variable names and values in the URL, which has a maximum length of 255
characters.  52 of your fields could be one character long (A,a,B,b...) and
the remaining 8 would need to be two characters (aa,bb...), which takes up
68 characters.  Then there are 60 's and 60 ='s which brings your total to
188 characters.  Even if your data was all sinlge characters your total will
now be 248 characters, leaving only 7 characters for your domain name, path
and script name.

You could, of course, use the POST method, but I would still not recommend
this simbly because it is a nightmare for both the user entering the data
and the person writing the script.

Break the form up into smaller pieces along logical boundaries.  For
example, submit contact information first and then move on to a form which
submits qualification information and so on.

Third, your database should probably not consist of a single table with 60
fields.  There is rarely an occasion where it is necessary or desirable to
have a 60 field table.  Break your tables up into logic groups along the
same lines as your forms.  You could have, for example, a table for contact
information and a table for qualification information.  Each table would
contain a unique id field that related to the other tables.

Find a tutorial on the web about database normalization to learn how to best
design your databases.  This should be the first step in the application
design process and all other work should be based on it.

Good luck and happy PHPing.

Fred

Masudi Olivier [EMAIL PROTECTED] wrote in message
004e01c17b29$db1756e0$[EMAIL PROTECTED]">news:004e01c17b29$db1756e0$[EMAIL PROTECTED]...
What is the best way to handle a form with 60 fields ?
Is it a maximum number of var that i can regisister in a session ? is it
possible to configure this number in php.ini ?
I dont'host my web site I use a hoste company where my site is hosted on an
linux/apache server with php4.
Is it a good idea to register  the 60 vars in my session and then to insert
them into a databes or is it better to insert only somme of them and make a
link to a file where i store all the others fields ?

What pissed me off most is to declare and handle so many vars.
It' s a form for a congress registration and users have to enter a lot of
information.


I hope that some kind php master will give me some good tip to speed up my
dev. time

Thanks and Peace




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]