Hello,
if I use the following function for all my mySql commands in php, am I
protected against all SQLinjections and XSS attacks?
function sanitize($value ){ return
mysql_real_esca pe_string(htmls pecialchars($va lue)); }
and i.e.
$query = "insert into users set username='".san itize($username )."'";
and
$query = "select * from users where
username='".san itize($username )."'";
or do I miss something here?
thanks
pm
if I use the following function for all my mySql commands in php, am I
protected against all SQLinjections and XSS attacks?
function sanitize($value ){ return
mysql_real_esca pe_string(htmls pecialchars($va lue)); }
and i.e.
$query = "insert into users set username='".san itize($username )."'";
and
$query = "select * from users where
username='".san itize($username )."'";
or do I miss something here?
thanks
pm
Comment