Unexpected error in PDO class

1

I've been breaking the code with this code for some time, it's the first time I'm using the PHP PDO class and I'm having an error that I do not know how to solve.

<?php
include "conexao.php";
$banco = new Banco(); //Instanciando o banco de dados

$filtro = array("/", "-", ".", "(", ")", " "); //Filtro de caracteres indesejados

$nome = $_GET['nome'];
$senha = $_GET['senha'];
$email = $_GET['email'];
$nascimento = str_replace($filtro, "", $_GET['nascimento']);
$telefone = str_replace($filtro, "", $_GET['telefone']);

$resultado = $banco->prepare("INSERT INTO clientes(id_cliente, nome_cliente, 
                                                         email_cliente, telefone_cliente, senha_cliente, 
                                                         data_nasc_cliente) VALUES(NULL, :nome, :email, 
                                                          :telefone, :senha, :nascimento");

$resultado->execute(array(
  ':nome' => $nome,
  ':email' => $email,
  ':telefone' => $telefone,
  ':senha' => $senha,
  ':nascimento' => $nascimento                                     
));

The above code is not entering the table.

    
asked by anonymous 22.10.2016 / 16:18

1 answer

2

There was a missing link at the end of the connection string

...VALUES(NULL, :nome, :email, :telefone, :senha, :nascimento)");

FML

    
22.10.2016 / 17:42