hello guys ,,
i'm coding script but i have problem with INSERT & SELECT articles ..
first i'm using BBcode ( MarkItUP ) ..
i wanna my script like vb when i submit article with
php code like
[php...] or [code..]
appear like Vb script
when insert article content i'm using this function
When select using
when article content include form html code in [php ..] it's appear form not code
and when using (htmlspecialchars) ..
content appear like this pic
i wanna submit article like vb include font color and size and when have php code appear code not form ..
i'm coding script but i have problem with INSERT & SELECT articles ..
first i'm using BBcode ( MarkItUP ) ..
i wanna my script like vb when i submit article with
php code like
[php...] or [code..]
appear like Vb script
when insert article content i'm using this function
PHP:
function anti_xss($content)
{
$content = htmlentities($content);
$content = mysql_real_escape_string($content);
if(get_magic_quotes_gpc())
{
$content = stripslashes($content);
}
return $content ;
}
When select using
PHP:
$content = ToHtml(nl2br($row['content']));
echo $content;
when article content include form html code in [php ..] it's appear form not code
and when using (htmlspecialchars) ..
content appear like this pic
i wanna submit article like vb include font color and size and when have php code appear code not form ..