![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
07/06/2010, 08:08
|
![Avatar de Most](http://static.forosdelweb.com/customavatars/avatar292184_2.gif) | | | Fecha de Ingreso: marzo-2009
Mensajes: 642
Antigüedad: 15 años, 10 meses Puntos: 6 | |
Respuesta: problema con form Error: Cita: error insertando los datos 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 '�o,servidor,detalles,enlaces) VALUES (default,'','Iron Man 2','2010','rapi' at line 1
Codigo: Código PHP:
<? //recibimos las variables enviadas por el formulario $caratula=$_POST['caratula']; $nombre=$_POST['nombre']; $anio=$_POST['anio']; $servidor=$_POST['servidor']; $detalles=$_POST['detalles']; $enlaces=$_POST['enlaces']; //conectamos a la base $connect=mysql_connect("xxxxxx","xxxxx","xxxx"); //Seleccionamos la base mysql_select_db("xxx",$connect); //insertamos los registros almacenados en las variables mysql_query("insert into noticias(id,caratula,nombre,año,servidor,detalles,enlaces) VALUES (default,'".$caratula."','".$nombre."','".$anio."','".$servidor."','".$detalles."','".$enlaces."'") or die("error insertando los datos " . mysql_error()); ?>
parece un no acabar xD
Última edición por Most; 07/06/2010 a las 08:16 |