Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browser Variable Length

Status
Not open for further replies.

KSiva

Programmer
Feb 18, 2002
63
AU
Is there any size limit for the text to pass to a variable?

Does all the browser get all the text. My friend advice some browser might cut off the text length as you pass a longer text to it! Is that true?

Cheers, Sivakumar Kandaraj :)
System Administrator,Web Programmer
Melbourne
Australia.
 
Well, I'm trying to figure out exactly what you are asking ... as there are different reasons for things like text being cut off.

If you are passing variables from a form to another page, you should always use "POST" because it will not cutoff any text from the variables - the amount of data allowed in a URL variable is limited and you risk losing some of it. Plus POST looks cleaner.

TEXT form fields only allow a max of 255 characters, whereas TEXTAREA fields are pretty much unlimited.

If you are posting to a database, the field in the DB will determine how much data is retained. i.e. If you have a TEXT field in the DB and it is set to 50 characters, but you pass 100 characters to it:

- in access it will only use the first 50 characters
- in SQL server it will give an error saying it will have to truncate the data.

In summary, if you do not have to pass data in a URL, don't - if you do, then keep it very brief to ensure proper transference.

Hope that helps,

Glen Palmer
SafariTECH

 
Great Thanks Mate!

Guess I should have explained well. But appreicate that you got me and answered me!

Thanks Again! Sivakumar Kandaraj :)
System Administrator,Web Programmer
Melbourne
Australia.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top