Skip to main content

Simon D's Library tagged php   View Popular

MySQL Tutorial - SQL Injection

  • Injection Prevention - mysql_real_escape_string()


    Lucky for you, this problem has been known for a while and PHP has a specially-made function to prevent these attacks. All you need to do is use the mouthful of a function mysql_real_escape_string.


    What mysql_real_escape_string does is take a string that is going to be used in a MySQL query
    and return the same string with all SQL Injection attempts safely escaped. Basically, it
    will replace those troublesome quotes(') a user might enter with a MySQL-safe substitute, an escaped quote \'.

1 - 20 of 26 Next ›
Showing 20 items per page

Diigo is about better ways to research, share and collaborate on information. Learn more »

Join Diigo