PHP: Is mysql_real_escape_string sufficient for cleaning user input?

Posted by Thomas on Stack Overflow See other posts from Stack Overflow or by Thomas
Published on 2010-03-01T03:06:08Z Indexed on 2010/04/09 14:13 UTC
Read the original article Hit count: 368

Filed under:
|

Is mysql_real_escape_string sufficient for cleaning user input in most situations?

::EDIT::

I'm thinking mostly in terms of preventing SQL injection but I ultimately want to know if I can trust user data after I apply mysql_real_escape_string or if I should take extra measures to clean the data before I pass it around the application and databases.

I see where cleaning for HTML chars is important but I wouldn't consider it necessary for trusting user input.

T

© Stack Overflow or respective owner

Related posts about php

Related posts about security