ASP and PHP under textarea submit a large number of data loss solution _php Tips

Source: Internet
Author: User
I used textarea to submit a lot of data.
I started the field type is Mediumtext, the data is missing
Then I changed to Longtext, the data was still lost,
And found that the amount of data submitted to the database by Mediumtext is the same,
did not increase. How can we solve this problem?
ASP only need to use the following method
Copy Code code as follows:

Sub Content ()
Dim i,scontent
' Fetch the data submitted.
' It is said that the automatic processing of large forms, to use the loop, otherwise greater than 100K content will be possible to take, a single table single limit of 102399 bytes (100K or so), to be discussed. Refer to an editor ...
' begins to take 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 usually the problem of special characters, the solution is referred to below
What kind of special characters? You should be able to enter it unless your quotes are not escaped.
Use GET_MAGIC_QUOTES_GPC to see what the value is, and if 1, the post data will be automatically escaped unless it is processed again. If 0, the post data is addslashes and then inserted. If not, and the value is 1, then use stripslashes will be escaped data back, direct call mysql_escape_string escape after storage, if not, put your special characters posted out.

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.