Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/06/2009, 15:08
Strancyth
 
Fecha de Ingreso: mayo-2009
Mensajes: 30
Antigüedad: 15 años
Puntos: 0
ayuda con codigo php

Hola tengo un problema conn un codigo php


aqui lo pongo

Código PHP:
<?
include('conectar.php');
if(
$_POST[entrar]) {
$fecha date("d.m.Y , H:i:s");
$texto =  $_POST['texto'];

$diario mysql_query("INSERT INTO diario (fecha,texto) VALUES ('$fecha','$texto')");
echo 
"Texto enviado";
}

?>
<form method="post">
Texto:
<input name="texto" type="text" >
<input type="submit" name="entrar" />
</form>
<?php
$diario 
mysql_query("SELECT * FROM diario ORDER BY id DESC") or die(mysql_error());
while (
$row mysql_fetch_array($diario)) { 
$row['texto'] = str_replace("\n","<br>",$row['texto']);

echo 
"<div><table width=\"951\" height=\"193\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
  <tr>
    <td width=\"1023\" height=\"26\"><div align=\"center\">"
.$row['fecha']."</div></td>
  </tr>
  <tr>
    <td height=\"167\">"
.$row['texto']."</td>
  </tr>
</table></div>"
;
}

?>
mi problema es que no muestra nada solo el form del principio

pero en teoria debajo del form deveria mostrar una tabla con la fecha y un pequeño texto irepetir una y otra vez segun las entradas que hayan

pero no muestra nada

ayuda


y saludos