php - How to sanitize $_REQUEST without mysql_real_escape_sequence() -
i have been using php/mysql while now, want sanitize super globals on start of program havent connected database yet. there other php defined function make variables sql safe. , can tell me why active mysql connection required before using mysql_real_escapce_string
i want sanitize super globals on start of program.
that isn't best idea. should sanitise variables based on context. if run of variables through mysql_real_escape_string()
, may find have issues when want use variable outside of sql context.
is there other php defined function make variables sql safe?
you use bound parameters library such pdo.
can tell me why active mysql connection required before using
mysql_real_escape_string()
?
i believe because function needs know character set database using can escape correctly.
Comments
Post a Comment