Ver Mensaje Individual
  #8  
Antiguo 24-04-2007
Avatar de lucasarts_18
lucasarts_18 lucasarts_18 is offline
Miembro
 
Registrado: mar 2005
Ubicación: Villa Alemana,Chile
Posts: 1.087
Reputación: 21
lucasarts_18 Va por buen camino
Cita:
Empezado por Caray
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 ',,1,4)' at line 1
Aque se debe ese error, será que mi código esta erroneo?.
Con esto me despido, gracias otra vez por sus respuestas.
El mismo error de mysql lo está diciendo, tu sintaxis del Insert está mal hecha

Código PHP:
<?php 
$mi_respuesta
=$_POST['pregunta']; 
$total_respuesta=count($mi_respuesta); 
for(
$i=1;$i<=$total_respuesta;$i++) 

$sql="INSERT INTO encuesta(c_unidad,c_profesor,c_materia,nopre,resp) VALUES ("'$_POST['c_unidad']','$_POST['c_profesor']','$_POST['c_materia']',' $i ','$mi_respuesta[$i]'")"
mysql_query($sql); 

?>
modifiqué tu consulta, además creo que te está llegando un parametro vacío del insert.......por ahí creo que van los tiros.

Nos vemos..
__________________
No todo es como parece ser...
Responder Con Cita