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

WBOY
Release: 2016-07-29 08:37:26
Original
883 people have browsed it

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 amount of data submitted to the database by mediumtext was the same,
and 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 it can automatically process large forms , use a loop, otherwise content greater than 100K may not be retrieved. The limit for a single form item is 102399 bytes (about 100K), which 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


This is usually a problem with special characters in php, and the solution 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.

The above introduces the solution to the loss of large amounts of data submitted by textarea under asp and php, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!