Ver Mensaje Individual
  #6 (permalink)  
Antiguo 28/09/2004, 06:50
Avatar de navessd
navessd
 
Fecha de Ingreso: junio-2003
Ubicación: Topus Uranus
Mensajes: 158
Antigüedad: 20 años, 10 meses
Puntos: 0
me resultó

ahora si que me funcinó, estoy feliz, son mis primero scripts
les dejo el códogo por alguien lo quiere tomar:
Código PHP:
<?php
   mysql_connect
("localhost","usuario","pass");
   
mysql_select_db("mi_db");

$query='SELECT origen, fecha, titulo, resumen FROM noticias';
$result=mysql_query("$query") or die("error en consulta <b>$query</b> :".mysql_error());
?>

<table width="700" border="0" cellpadding="0" cellspacing="2" class="tabla01">
  <tr bgcolor="#FF9900">
    <td width="78">origen</td>
    <td width="120">fecha</td>
    <td width="170">titulo</td>
    <td width="318">resumen</td>
  </tr>

<?php 
while($fila mysql_fetch_array($result))
{
printf("<tr><td>%s</td><td>%s</td><td><strong>%s</td><td>%s</td></tr>"$fila["origen"],$fila["fecha"],$fila["titulo"],nl2br($fila["resumen"]));
}
?>
</table>
al último campo le apliqué la función nl2br() para que me respetara los saltos de linea.

gracias
__________________
Bush, te vamo a rajarte el Paño!!!!

Última edición por navessd; 28/09/2004 a las 06:56