I am having trouble posting a script using my html form.. If i remove functions like mysql_real_escape_string() or htmlentities() the query execution gives error like characters ' or " are causing problems, I want to post a script with <script>code</script> in the field and want it working on the html page as it is coded on an html page.. Can anyone help?
This is the input field
Description</b></td><td><textarea name="news_des" cols="50" rows="7">
extracting the information
if(!empty($_POST['news_des']))
{
$news_des = mysql_real_escape_string(trim(htmlentities($_POST['news_des']))); // to get tags along
}else
{
$error[] = 'You forgot to enter the News Description!';
}