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")));


 

Comments

Popular posts from this blog

Ghostscript Installation and Configuration in Windows 7

Joomla - Get user id