Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/01/2009, 17:55
toniveas
 
Fecha de Ingreso: diciembre-2001
Mensajes: 118
Antigüedad: 23 años, 2 meses
Puntos: 0
Error de la BD a un INPUT

Hola,

Tengo un pequeño problema, en este php que utilizo para editar registros publicados en una BD, se muestran los resultados en INPUTS para poder ser editados, el problema es que solo muestra la primera palabra de cada registro.

Código PHP:
<b>Editar Publicación</b>
<?php
$id
=$_POST[id];
$conexion mysql_connect("***""***""***");
if (! 
$conexion)
{
echo 
"<h2 align='center'>ERROR: Imposible establecer conexión con el servidor</h2>";
exit;
}
mysql_select_db("***"$conexion);

$result mysql_query("SELECT * FROM toniveas where idArticulo=".$id$conexion);


if (!
$result)
{
echo
"Error en la consulta del vehículo.<br><br><br><br><br><hr>";
echo 
"<a href=index.html>Volver a menú inicio</a>";
exit;
}

$row mysql_fetch_row($result);

?>

<form method='post' action='editar.php'>

<table>
<tr>
<td> Sección:&nbsp;&nbsp;</td><td> <input type=text name='seccion' value=<? echo $row[1];?>></td>
<tr>
<td> Titulo:&nbsp;&nbsp;</td><td> <input type=text name='titulo' value=<? echo $row[2];?>></td>
<tr>
<td> Fecha de Publicación:&nbsp;&nbsp;</td><td> <input type=text name='fecha' value=<?echo $row[3];?>></td>
<tr>
<td> Teaser&nbsp;&nbsp;</td><td> <input type=text name='teaser' value=<?echo $row[4];?>></td>
<tr>
<td> Texto:&nbsp;&nbsp; </td><td><input type=text name='texto' value=<?echo $row[5];?>></td>
<tr>
<td> <input type=submit value='Guardar'></td><td></td>
</tr>
<input type=hidden name=id value=<? echo $row[0]; ?>>
</table>
</form>

<br>
<hr>
<a href=index.html>Volver a menú inicio</a>
</body>
</html>
En cambio, en el PHP que utilizo para mostrar los registros ya publicados, éstos aparecen completos.

A que se pude deber?

Muchas gracias