what datatype i should take?

when we take input type=text and in the database we have the datatype varchar , then we are able to access the value. if i take a textarea then what datatype i should take in the database??
designersxAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Beverley PortlockConnect With a Mentor Commented:
"sir tell me 1 thing , in textarea can we write any amount of data??"

No. There are limits.

TEXT => 64K maximum
MEDIUMTEXT => 16M maximum
LONGTEXT => 2GB maximum

"if suppose i take datatype to be longtext then textarea would work or not?? please tell me"

It should work OK, but your PHP installation may have a POST limit of 8M (which is not uncommon). You can change this by checking php.ini and looking for POST_MAX_SIZE
0
 
Beverley PortlockCommented:
For a textarea use data type TEXT. This will allow you to have up to 64K of data in the field. If you need more than this then look at MEDIUMTEXT.

TEXT fields are not as indexable as VARCHAR fields.
0
 
designersxAuthor Commented:
thanks for the above post.

sir tell me 1 thing , in textarea can we write any amount of data??
if suppose i take datatype to be longtext then textarea would work or not?? please tell me
0
All Courses

From novice to tech pro — start learning today.