mysql_real_escape_string
Posted: Tue May 18, 2010 10:21 am
Hi All I have a problem with outputting data.
Everything that is posted via $_POST I first secure with the following statement:
$variable = mysql_real_escape_string($variable);
Now I have a form where people can enter text. When something went wrong people do not have to type in al the text again. it is first stored in mysql and then loaded again in the form.
For example it can look like this (enters):
input line one
input line two
input line three
When it is loaded again it is converted into: input line one\r\ninput line two\r\ninput line three. This should not happen. Or it should to make the input save. But when I echo this I get these \r\n. How can I visualize the ouput with enters again?
B.r.
Herman
Everything that is posted via $_POST I first secure with the following statement:
$variable = mysql_real_escape_string($variable);
Now I have a form where people can enter text. When something went wrong people do not have to type in al the text again. it is first stored in mysql and then loaded again in the form.
For example it can look like this (enters):
input line one
input line two
input line three
When it is loaded again it is converted into: input line one\r\ninput line two\r\ninput line three. This should not happen. Or it should to make the input save. But when I echo this I get these \r\n. How can I visualize the ouput with enters again?
B.r.
Herman