Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/01/2009, 00:07
Avatar de bioxido
bioxido
 
Fecha de Ingreso: diciembre-2008
Ubicación: $_SERVER['PHP_SELF']
Mensajes: 601
Antigüedad: 15 años, 5 meses
Puntos: 21
problema con "stripslashes()"

Emm... hace poco postee un mensaje, sobre que estaba haciendo una pagina de noticias y bueh... ese tema quedoo solucionado...


Ahora tengo otro problema, cuando uso stripslashes() para emmm "filtrar" (?) la informacion que obtengo de la base de datos... me lee solo la ultima noticia en la base de datos..

Emmm... digamos, que usando stripslashes solo puedo tomar 1 sola noticia de la DB...

Aca un ejemplo...

Aqui estoy usando stripslashes, y se ve 1 sola noticia, por mas que este LIMIT en 5

http://worldanime.tv/emi/db/sasa.php

Aqui no estoy usando stripshashes, y se ven las 5 noticias, pero claro... se ven mal, por que no estoy usando stripslashes xD

http://worldanime.tv/emi/db/sasa2.php

Los codigos son...

Esta con stripslashes:

Código PHP:
<head>

<?
$dbhost 
"XXXXXX";
$dbuname "XXXXXXX";
$dbpass "XXXXXXXXXX";
$dbname "XXXXXXXXXX";

$link mysql_connect$dbhost$dbuname$dbpass) or die ( "Error Conectando a La Bases De Datos.");
mysql_select_db$dbname,$link ) or die ("Error Seleccionando La Base De Datos.");

$result mysql_query("SELECT title,time,hometext FROM nuke_stories ORDER BY nuke_stories.sid DESC LIMIT 5"$link);

while (
$row mysql_fetch_array($result))

$hometext stripslashes($row['hometext']);


{


?>
</head>

<body>
<table  align="center" width="72%" height="41">
<title>Prueba</title><td width="100%" background="http://i286.photobucket.com/albums/ll96/bioxido8/1421351-2.jpg" height="27">
  <? echo '<font color="#ffffff" face="Arial" size="4">'.$row[title]. '</font>';?>  </div></td>
</table>
</table>
<td width="100%" bacjgriybd="#c9c9c9"><div align="center"><font color="#000000" face="Arial" size="2">
      <? echo  $hometext ;
        }
     
?>
     
  </div></font></div></td>
</table>
</body>
Y esta sin stripslashes....

Código PHP:
<head>

<?
$dbhost 
"SSSSSSS";
$dbuname "SSSSSS";
$dbpass "SSSSSS";
$dbname "SSSSSSSSSSS";

$link mysql_connect$dbhost$dbuname$dbpass) or die ( "Error Conectando a La Bases De Datos.");
mysql_select_db$dbname,$link ) or die ("Error Seleccionando La Base De Datos.");

$result mysql_query("SELECT title,time,hometext FROM nuke_stories ORDER BY nuke_stories.sid DESC LIMIT 0 , 5"$link);

while (
$row mysql_fetch_array($result))

{


?>
</head>

<body>
<table  align="center" width="72%" height="41">
<title>Prueba</title><td width="100%" background="http://i286.photobucket.com/albums/ll96/bioxido8/1421351-2.jpg" height="27">
  <div align="center"><? echo '<font color="#ffffff" face="Arial" size="4">'.$row[title]. '</font>';?>  </div></td>
</table>
</table>
<td width="100%" bacjgriybd="#c9c9c9">
      <? echo '<div align="center"><font color="#000000" face="Arial" size="2">' .$row[hometext]. '</font></div>'
    }
     
?>
  </div></td>
</table>
</body>
Agradezco su ayuda ^^