Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 251
  • Last Modified:

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??
0
designersx
Asked:
designersx
  • 2
1 Solution
 
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
 
Beverley PortlockCommented:
"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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now