
04/10/2011, 11:25
|
| | Fecha de Ingreso: agosto-2010
Mensajes: 33
Antigüedad: 14 años, 7 meses Puntos: 0 | |
Respuesta: No puedo modificar una noticia a traves del Form en el servidor Hola de nuevo,
He provado tambien poniendo después del echo, mysql_error ()
$qry="UPDATE noticias SET titulo='$titulo', fecha='$fecha', texto='$texto' WHERE id_noticia=$'id'";
echo $qry;
$consulta=mysql_query($qry,$conexion)or die(mysql_error());
Me devuelve esto:
UPDATE noticias SET titulo='prueba', fecha='prueba25', texto='"prueba"' WHERE id_noticia=$'id'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''id'' at line 1
A estas variales les he puesto una comilla simple, creo que és correcto.
$id= $_POST['id'];
$titulo= $_POST['titulo'];
$fecha= $_POST['fecha'];
$texto= $_POST['texto'];
Pero ponga o saque comillas no funciona.
Jana |