jeudi 10 septembre 2015

Parse error: syntax error, unexpected '"'"' (T_CONSTANT_ENCAPSED_STRING)

I have the following PHP file:

<?php
/**
* Ejemplo sencillo para extender la clase SQLite3 y cambiar los parámetros
* de __construct, después usar el método open para inicializar la BD.
*/
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");

$dato_Nombre = (string)$_GET["dato_Nombre"];
$dato_ApPat = (string)$_GET["dato_ApPat"];
$dato_ApMat = (string)$_GET["dato_ApMat"];
$dato_Direccion = (string)$_GET["dato_Direccion"];
$dato_Tel = (string)$_GET["dato_Tel"];
$dato_email = (string)$_GET["dato_email"];


//print $usuario;

class MiBD extends SQLite3
{
function __construct()
{
$this->open('mibdsqlite.db');
}
}

$bd = new MiBD();
$bd->exec("INSERT INTO vendedor (nombre,apPat,apMat,direccion,telefono,correo) VALUES ('".$dato_Nombre."','".$dato_ApPat."','".$dato_ApMat."','".$dato_Direccion."','".$dato_Tel."','".$dato_email."'".")");
?>

When I try to run the code I get this error:

Parse error: syntax error, unexpected '"'"' (T_CONSTANT_ENCAPSED_STRING) in N:\WT-NMP\WWW\servicios\guardarvendedor.php on line 30

I've checked my database field names and they are correct.

I know this error comes possibly from missing a concatenator or a "." somewhere, but I just can't find where or if there's any other mistake I'm running into.

Also, funny thing... I don't have a line 30.

Aucun commentaire:

Enregistrer un commentaire