mysql_real_escape_string problem
Posted: Thu May 26, 2011 7:34 am
Hello Friends,
am still having problem with mysql_real_escape_string in my forms. whether magic_quotes_gpc is On or Off, i still receive slashes in my entries. someone introduced this code to me but stil end up in the same way. But i came up with the combination of these two
Pls can i use this or is there a better way of doing it?
am still having problem with mysql_real_escape_string in my forms. whether magic_quotes_gpc is On or Off, i still receive slashes in my entries. someone introduced this code
Code: Select all
mysql_real_escape_string(strip_tags($_POST['first_name']));Code: Select all
$name2=stripslashes($_POST[name]);
$sname=mysql_real_escape_string($name2);