Ver Mensaje Individual
  #18 (permalink)  
Antiguo 15/07/2010, 09:43
apustilnik
 
Fecha de Ingreso: septiembre-2009
Mensajes: 402
Antigüedad: 15 años, 4 meses
Puntos: 6
Respuesta: Necesito ayuda

exelente aporte! como no se me habia ocurrido ese if
voy a probarlo y despues te cuento ke onda.
muchisimas gracias por la ayuda y la paciencia
te tengo al tanto de como funciona esto cuando lo pruebe.
un abrazo,
ariel
Cita:
Iniciado por johhan16 Ver Mensaje
prueba esto a ver si te funciona



Código PHP:
<? $consulta2"select * from foro order by id desc";
$resultado2mysql_query($consulta2);
$nummysql_num_rows($resultado2);
for (
$i=0;$i<$num;$i++)
{
$rowmysql_fetch_array($resultado2);
$url1= ($row['url']);
$url_act= @fopen($url1,'r');
$imagen2= ($row['imagen']);
$_SESSION['imagen2'] = $imagen2;
$ruta$_SESSION['imagen2'];


$width80;
$break"<br />\n";
$cuttrue;
$comentario= ($row['comentario']);


//aqui agregue un if
if($row['username']== $_SESSION['username']) {

echo 
"<td>".redimensionar($ruta,$ancho,$alto)."<fon t face=arial size=1 color=#999999> ".($row['fecha'])." | ".($row['hora'])." | </font><font face=arial size=2 color=#0080C0><strong> ". ($row['username']). "</strong> | dijo:</font> <font face=arial size=2 color=#999999>".wordwrap($comentario,$width,$break )." <a href=".($row['url'])." target=_blank class=URL>".($row['url'])."</a><a href='eliminar.php?id=".$row['id']."'>eliminar</a></td></tr></table>";
echo 
"<font face=arial size=2 color=#C6ECFF>"
}
else
{
echo 
"<td>".redimensionar($ruta,$ancho,$alto)."<fon t face=arial size=1 color=#999999> ".($row['fecha'])." | ".($row['hora'])." | </font><font face=arial size=2 color=#0080C0><strong> ". ($row['username']). "</strong> | dijo:</font> <font face=arial size=2 color=#999999>".wordwrap($comentario,$width,$break )." <a href=".($row['url'])." target=_blank class=URL>".($row['url'])."</a></td></tr></table>";
echo 
"<font face=arial size=2 color=#C6ECFF>"
}

?>
edito: me habia equivocado al escribir el codigo alli esta corregido