keep textarea input format after using mysql_real_escape_string to store

前端 未结 5 992
时光说笑
时光说笑 2021-01-14 05:05

I am using php5.3.6 and mysql 5.1.56 and CodeIgniter. Here is what I did.

  1. Input some text in textarea, something like this:


    what\'s this?

5条回答
  •  时光说笑
    2021-01-14 06:06

    MySQL escapes the string, but when displaying the result back to you it will give you the same result as if it was unescaped.

提交回复
热议问题