Tema: fecha en php
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/05/2005, 08:16
ivans67
 
Fecha de Ingreso: diciembre-2004
Mensajes: 65
Antigüedad: 19 años, 5 meses
Puntos: 1
fecha en php

estoy creando un sistema de comentarios para mi web pero .... tengo un problema y es que quiero registrar la fecha de publicacion de un comentario en la base de datos, como lo hago?
comentarios.php
<html>
<head>
<title> comentarios</title>
</head>

<?php


//conexion a la base de datos
include ("config.php");
// seleccionamos la tabla y recojemos los valores
$result=mysql_db_query("mixta","select * from notmundo order by desc");
?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%">NOTICIAS</td>
</tr>
<tr>
<td width="100%">&quot;titulo&quot;</td>
</tr>
<tr>
<td width="100%">&quot;noticia&quot;</td>
</tr>

<?
// creamos el bucle

while ($row=mysql_fetch_array($result))
{
?>
<?
echo '<tr><td width="100%" style="border-style: solid; border-width: 2" bgcolor="#FFCC00">'.$row["titulo"].'</td></tr>';
echo '<td>'.$row["comentario"].'</td></tr>';
?>

<?
}
?>
<?
mysql_free_result($result);
?>
</table>
</html>

esta es la tabla
CREATE TABLE `notmundo` (
`id` int(100) NOT NULL auto_increment,
`titulo` text,
`comentario` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;



por favor diganme donde incluyo los la fecha en la tabla y dentro del script comentarios;

__________________
contactenme a
[email protected]

[email protected] :aplauso: :aplauso: