Solutions for the loss of large amounts of data submitted under ASP and PHP textarea

Source: Internet
Author: User
I use textarea to submit a large amount of data
I started the field type selected is Mediumtext, the data has been lost
Later I changed to Longtext, the data is still lost,
And the amount of data that is found and Mediumtext committed to the database is the same,
did not increase. How to solve it?
The ASP only needs to use the following method to

Copy the Code code as follows:


Sub Content ()
Dim i,scontent
' Fetch the submitted data.
It is said that the automatic processing of large forms, to use the loop, otherwise greater than 100K content will not be able to get, a single table item limit of 102399 bytes (100K or so), it is debatable. Refer to an editor:
' Start value-----------------
Scontent = ""
For i = 1 to Request.Form ("D_content"). Count
Scontent = scontent & Request.Form ("D_content") (i)
Next
' End value-----------------
End Sub


PHP is generally a special character of the problem, the solution refer to the following
What kind of special characters? You should be able to enter the quotation mark unless you have escaped the quote.
Use GET_MAGIC_QUOTES_GPC to see what the value is, and if it is 1, the post data is automatically escaped unless it is processed again. If it is 0, then insert the post data addslashes a bit. If not, and the value is 1, then use stripslashes will be escaped data back, directly call Mysql_escape_string escape after warehousing, if not yet, put your special characters out.

The above describes the ASP and PHP under the textarea submitted a large number of data loss solution, including the content, I hope the PHP tutorial interested in a friend helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.