Possible Duplicate:
Is htmlentities() and mysql_real_escape_string() enough for cleaning user input in PHP?
In my site for the sql injecion i used mysql_real_escape_string but now suppose someone wants to enter PHP code in the forum so ised htmlentities function. my code is as below :
$not_con =mysql_real_escape_string(htmlentities($_POST['note']));
than i update sql db like
  mysql_query("UPDATE forumtopic set forumDescri='$not_con' WHERE forum_id=$f_id");
Now when i entered simple PHP code in textbox like <?php echo "hi" ?> than no proble its inserted into database succesfully.but
When i enter <?php session_start(); echo "hi" ?> it gives error like FORBIDDEN you dont have permission 404 error.help me in this
 
    