Ok, entonces creo ke el error esta en el
$comment = htmlspecialchars($comment);
no?
la cuestion es ke trato de hacerlo colocando primero el ereg_replace dell [ code ] [ /code ] es decir, trato de hacerlo asi:
Código PHP:
<?
$conexion = mysql_connect("localhost","root","pass");
mysql_select_db("base",$conexion);
//------------------------------------------------
function bbcodes($comment) {
$comment = ereg_replace('\\[code\\](.*)\\[/code\\]',"<table width=95% cellspacing=0 cellpadding=0 border=0 bgcolor=e2e2e2 align=center><tr><td>".highlight_string("\\\\1",true)."</td></tr></table>",$comment);
$comment = htmlspecialchars($comment);
$comment = nl2br($comment);
return $comment;
} // de la function.
//------------------------------------------------
if (isset($go)) {
$comentario = bbcodes($_POST[comentario]);
mysql_query("INSERT INTO comentarios (id_coment, nombre, ip, comentario) values ('1', 'Volrath', '155.155.155.55', '$comentario')");
header("Location: comentarios.php");
} // del if (go)
?>
y me imprime la tabla que se supone ke es el string replacement del ereg_replace :? :
Código PHP:
<table width=95% cellspacing=0 cellpadding=0 border=0 bgcolor=e2e2e2 align=center><tr><td>CONTENIDO</td></tr></table>
que puedo hacer :S?