Home  >  Article  >  Backend Development  >  Solution to the loss of large amounts of data submitted by textarea under asp and php_PHP tutorial

Solution to the loss of large amounts of data submitted by textarea under asp and php_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:53:23790browse

I used textarea to submit a large amount of data
I initially chose mediumtext as the field type, and the data was lost
Later I changed it to longtext, but the data was still lost.
And I found that the data submitted to the database was the same as mediumtext. The amount is the same,
has not increased. How to solve it?
You only need to use the following method under asp

Copy the code The code is as follows:

Sub Content()
Dim i,sContent
' Get the submitted data
' It is said that for automatic processing of large forms, loops must be used, otherwise content greater than 100K may not be fetched. The limit for a single form item is 102399 Bytes (around 100K), is subject to discussion. . Refer to an editor. .
'Start getting value-----------------
sContent = ""
For i = 1 To Request.Form("d_content").Count
sContent = sContent & Request.Form("d_content")(i)
Next
' End value-----------------
End Sub

There is usually a problem with special characters in PHP. For solutions, please refer to the following
What kind of special characters are there? Unless you don't escape the quotation marks, it should be able to be entered.
Use get_magic_quotes_gpc to see what the value is. If it is 1, it means that the POST data will be automatically escaped unless it is processed again. If it is 0, then the POST data addslashes and then inserts it. If it still doesn't work, and the value is 1, then use stripslashes to convert the escaped data back, directly call mysql_escape_string to escape and store it in the database. If it still doesn't work, post your special characters.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318712.htmlTechArticleI used textarea to submit a large amount of data. I initially chose mediumtext as the field type, but the data was lost and I changed it to With longtext, the data is still lost, and the discovery and mediumtext are submitted to...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn