php - Mysql error while inserting a paragraph -


i trying insert paragraph (which contains single quote in middle) database below.

$rule="**mobile's** not allowed room...................soon";   mysql_query("insert table_name (rule) values('$rule')"); 

while executing query paragraph not inserting. , have directly tried in mysql using sql option. there shown error.

any suggestions..?

thanks

use

$rule = mysql_real_escape_string("**mobile's** not allowed room...................soon"); 

Comments

Popular posts from this blog

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -