You are in: home / community
About Me:
Chris... Nice post but why not use a regex before using addslashes()? if(!erg('^[[:graph:][:space:]]*$', $string){ exit();} This would only allow for whitespace and printable characters found in the range of ASCII 33 to 126 (punctuation and alphanumerics). i.e. $string = $_POST['$string']; if(!erg('^[[:graph:][:space:]]*$', $string){ exit();} $string = addslashes($string); or why don't you just stick with mysql's default charset setting UTF-8? Please, correct me if i'm wrong.Posted in /blog/2006/jan/addslashes-versus-mysql-real-escape-string. Sat, 07 Mar 2009 at 16:34:48: Link
Chris... Nice post but why not use a regex before using addslashes()?
if(!erg('^[[:graph:][:space:]]*$', $string){ exit();}
This would only allow for whitespace and printable characters found in the range of ASCII 33 to 126 (punctuation and alphanumerics).
i.e.
$string = $_POST['$string'];
$string = addslashes($string);
or why don't you just stick with mysql's default charset setting UTF-8? Please, correct me if i'm wrong.
Posted in /blog/2006/jan/addslashes-versus-mysql-real-escape-string.
Sat, 07 Mar 2009 at 16:34:48: Link
claimid.com/don_holi
Last 10 Comments
1