Cita:
Iniciado por enlinea777
Asi se hace.
Código PHP:
$fehca=date('d,m,Y');
mysql_query("insert into vidinfo(title,length,depo,kewl,uplo, hora) values ('$title','$length','$depo','$kewl','$uplo','','$fehca')", $conexion) or
die("SELECT problems ".mysql_error());
mysql_close($conexion);
echo "Video Submitted.";
Este metodo no me funciono

Las fechas me las mostraba como 0000-00-00
Cita:
Iniciado por argy
si tu campo es datetime o timestamp,puedes insertar la fecha con NOW()
insert into vidinfo(title,length,depo,kewl,uplo, fecha) values ('$title','$length','$depo','$kewl','$uplo',',NOW( ))",
Excelente argy, tu metodo me funciono de 10!
Una mas:
Como hago para que la fecha me la muestre como en este ejemplo (cuando saco la fecha que almacene en la base de datos con el form anterior)
Abril 12, 2009
Edit: Yo uso este codigo para mostrar los datos de la BD, pero la fecha me la muestra asi "2009-02-12 23:46:03"
Código:
<table align="center">
<tr>
<th>ID</th>
<th>Date</th>
<th>Title</th>
<th>Length</th>
<th>Depo</th>
<th>Kewl</th>
<th>Uplo</th>
</tr>
<?
//Mostramos los registros
while ($row=mysql_fetch_array($result))
{
echo '<tr><td>'.$row["id"].'</td>';
echo '<tr><td>'.$row["date"].'</td>';
echo '<td>'.$row["title"].'</td>';
echo '<td>'.$row["length"].'</td>';
echo '<td>'.$row["depo"].'</td>';
echo '<td>'.$row["kewl"].'</td>';
echo '<td>'.$row["uplo"].'</td></tr>';
}