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
Post a Comment