I have tinyMCE editor which is passing data to php processing file.
If I use $variable=$_POST(['tinyMCE_textarea']); everything is ok.
But I want to secure it so nothing bad will come from user who entered some data into textarea.
And when I use $variable=mysql_real_escape_string($_POST(['tinyMCE_textarea']));
The result becomes dammaged with some \" signs. So how can I add maximum security without changing the variable ?
TinyMCE is able to clean up data, however it is critical that you don’t rely on client-side stuff.
To secure data for database, you use
mysql_real_escape_string(). The result is intended for use with mysql and not for display.To secure data for display, you use the
htmlspecialchars()function. htmlentities() also works but would convert all applicable entities, so for security you only need htmlspecialchars().So the simplified picture is