PHP - Mysql - Apostrophe issue
The best solutions is to use:
mysql_real_escape_string()
Eg: INSERT INTO <t.name> ("content") VALUES (mysql_real_escape_string("There's a dummy content here"));
If you still facing issue, the best way is to use,
addslashes(mysql_real_escape_string())
Eg: INSERT INTO <t.name> ("content") VALUES (addslashes(mysql_real_escape_string("There's a dummy content here")));
mysql_real_escape_string()
Eg: INSERT INTO <t.name> ("content") VALUES (mysql_real_escape_string("There's a dummy content here"));
If you still facing issue, the best way is to use,
addslashes(mysql_real_escape_string())
Eg: INSERT INTO <t.name> ("content") VALUES (addslashes(mysql_real_escape_string("There's a dummy content here")));
Comments
Post a Comment