Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2006
    Posts
    11

    Unanswered: Sending lots of text with GET/POST?

    For some web pages that similar to forums, which let user to post unlimited amount of text and it will be stored in database, is it correct to use TEXT for the datatype which use to keep this kind of data? And at the PHP side, which method GET/POST should I use for transfering these kind of information? Thanks.

  2. #2
    Join Date
    Feb 2004
    Posts
    533
    Type
    Max.size
    Bytes

    TINYTEXT or TINYBLOB
    2^8-1
    255

    TEXT or BLOB
    2^16-1 (64K-1)
    65535

    MEDIUMTEXT or MEDIUMBLOB
    2^24-1 (16M-1)
    16777215

    LONGBLOB
    2^32-1 (4G-1)
    4294967295


    The maximum size of a BLOB or TEXT object is determined by its type, but the largest value you can actually transmit between the client and server is determined by the amount of available memory and the size of the communications buffers. You can change the message buffer size, but you must do so on both the server and client ends.
    http://mysql.communitech.net/doc/en/BLOB.html
    ~

    Bill

  3. #3
    Join Date
    Oct 2006
    Posts
    11
    So is that mean it is suitable to use TEXT to transfer and kept the data such as forums reply and so on? Then I think I should use POST to pass thru the PHP page, am I right?

  4. #4
    Join Date
    Feb 2004
    Posts
    533
    METHOD Attribute | method Property (FORM)
    When using the post method, there is no theoretical limit to the amount of data that can be sent to the HTTP server. The amount of data may be constrained by the physical limits of the client computer.

    When using the get method to send data to an HTTP server, the amount of data that can be sent is limited by the maximum length of a URL. In this case the URL cannot be longer than 2048 bytes.



    There is not a Form property called "datatype". You must be thinking of enctype or Encoding. The enctype property has a default value of application/x-www-form-urlencoded. For a file upload the property setting is multipart/form-data. For your purpose you do not need to set the enctype property the default value will apply.

    I find it useful to use the Get method while testing so you can see the URL data being sent then change to the Post for the production version.
    ~

    Bill

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •