[eluser]huaxz1986[/eluser]
First I get data from html:
Code:
addslashes($POST['text'])
I found that mysql_real_escape_string() can work too, but there is no function to delete the '\' that mysql_real_escape_string() add.
Second insert data into MYSQL.
The reverse action:
First get data from MYSQL:
Code:
stripslashes($result['text'])
Then show data in html,with htmlspecialchars() and nl2br().
Finally, I surprisingly see that some of data is shown with entity in html, not characters such as < > ' ".However some of data is shown correctly.
That is why?