Ver Mensaje Individual
  #5 (permalink)  
Antiguo 24/11/2010, 09:02
pod1221
 
Fecha de Ingreso: diciembre-2009
Mensajes: 43
Antigüedad: 14 años, 4 meses
Puntos: 0
Respuesta: ayuda al usar nl2br y addslashes

Cita:
Iniciado por Hidek1 Ver Mensaje
probe y no me dio error
Código PHP:
        $string "foo\r\nbar";
        
$string addslashes($string);
        echo 
$string;
        
$string stripslashes($string);
        
$string nl2br($string);
        echo 
$string
podrias mostrar algo de tu codigo ?
bueno este es:

nuevoarticulo.php

$post1=htmlspecialchars($_POST['Message']);
$post1=mysql_real_escape_string($post1);
$fecha=date("d/m/y H:i a");

$post=addslashes($post1);

mostrar.php

$titulo=$row['titulo'];
$post=$row['articulo'];
$post=nl2br($post);
$post=stripslashes($post);

echo "$post";

crees que pueda ser por el mysql_real_escape_string o el htmlspecialchars?.