I was wondering what people do with text provided by the user in a
form. Some cleaning needs to be done at some stage if you are going to
be putting it in a database or displaying it etc. But when is the time
to do that?
Do you clean it as soon as you get it?
Do you pass around the original text and clean it when you use it?
What about magic slashes? You need to addslashes before using in a db
statement, but you need to strip them when displaying. When do you do
that?
TIA.
Craig
form. Some cleaning needs to be done at some stage if you are going to
be putting it in a database or displaying it etc. But when is the time
to do that?
Do you clean it as soon as you get it?
Do you pass around the original text and clean it when you use it?
What about magic slashes? You need to addslashes before using in a db
statement, but you need to strip them when displaying. When do you do
that?
TIA.
Craig
Comment