This has little to no security.
What I do for some security is a simple function:
function escstr($s){
$b=array("'",'"');
$g=array("'",""");
return str_ireplace($b,$g,$s);
}
This should completely take away any chances of SQL injection; it also makes the data being inserted look nicer when it's outputted to the browser. <img src="/chatrooms/smilies/alien1.gif" alt="">
This has little to no security.
What I do for some security is a simple function:
function escstr($s){
$b=array("'",'"');
$g=array("'",""");
return str_ireplace($b,$g,$s);
}
This should completely take away any chances of SQL injection; it also makes the data being inserted look nicer when it's outputted to the browser. <img src="/chatrooms/smilies/alien1.gif" alt="">