The user data should be escaped when stored in the database, or escaped when retrieved, or handed to the front-end for processing in the template. What operations are required? Thank you! The user data should be escaped when stored in the database, or escaped when retrieved, or handed to the front-end for processing in the template.
What operations are required? Thank you!
Reply content:
The user data should be escaped when stored in the database, or escaped when retrieved, or handed to the front-end for processing in the template.
What operations are required? Thank you!
The database stores the original data, which is escaped during presentation because you cannot predict how the data should be escaped.
My opinion: If PDO is used for preprocessing, the original data is stored while the output is escaped. However, rich text needs to be filtered out when the output is not escaped. If php_mysql is used, it is better to use mysql_real_escape_string.