Ver Mensaje Individual
  #5 (permalink)  
Antiguo 06/02/2010, 17:36
soldierjesus
 
Fecha de Ingreso: agosto-2008
Ubicación: Cali . Colombia
Mensajes: 459
Antigüedad: 15 años, 8 meses
Puntos: 1
Respuesta: duda con radiobutton ty textbox

Problemas en la seleccionYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

ME GENERA AHORA ESTE ERROR :
CODE:
Cita:
<?php
ini_set ('error_reporting', E_ALL);

$nombre=$_POST["nom"];
$direccion=$_POST["dir"];
$barrio=$_POST["barrio"];
foreach ($barrio as $selbarrio) {
} $comu=isset($_POST["comu"]);
$tel_fijo=$_POST["tel"];
$tel_cel=$_POST["cel"];
$mail=$_POST["mail"];
$ruta=$_POST["ruta"];
$servi=$_POST["servi"];
$otro_servi= isset($_POST["otro_servi"]);
$trans=$_POST["trans"];
$otro_trans= isset($_POST['otro_trans']);


//codigo para llenar la base de datos
include 'conexion.php';
conectar();
$sql = "INSERT INTO persona (nombre,dir,barrio,comuna,tele,tele_movil,mail,ser vidores,tipo_servi,ruta_bus_encues,tipo_trans ";
"VALUES ($nombre','$direccion','$selbarrio''$comu','$tel_f ijo','$tel_cel','$mail','$otro_servi','$ruta','$ot ro_trans')";

$result = mysql_query($sql) or die ("Problemas en la seleccion".mysql_error());
echo "¡Gracias! Hemos recibido sus datos.\n";

echo " <script language='javascript1'>window.location='form_encue sta.php'; </script>";

?>
__________________
Jaime P. Bravo
Programador Web
MCP (Microsoft Certified Professional)