Ver Mensaje Individual
  #3 (permalink)  
Antiguo 02/01/2008, 14:16
Avatar de bulter
bulter
 
Fecha de Ingreso: enero-2008
Mensajes: 137
Antigüedad: 16 años, 4 meses
Puntos: 20
Re: ¿Ideas para almacenar y Renderizar articulos (textos) con BD / XML ?

HTML:

Código:
table.articulo{
    border: 1px solid #006699;
}
Código PHP:
$conn mysql_connection("localhost""root""")or die(mysql_error());
$selectDB mysql_select_db("database")or die(mysql_error());
$query mysql_query("SELECT titulo,subtitulo,parrafo,id FROM table where id = ".$id)or die(mysql_error());
$result mysql_fetch_array($query);

if(
$query && $result){
    echo 
"<table class='articulo'>
                  <tr>
                      <td>
                          echo $result["
titulo"];
                      </td>
                  </tr>
                  <tr>
                      <td>
                          $result["
parrafo"];
                      </td>
                  </tr>
              </table>"
;