Estou com dificuldades em encontrar a solução esse enigma... pois as variais chegam até o echo mas não são executadas para inserção no banco .
A resposta ao tentar é : Erro ao inserir os dados
ini_set('display_errors', true); error_reporting(E_ALL);
echo"email = ".$email. "<br>" ;
echo "ddd = ".$ddd ."<br>";
echo "telefone = ".$telefone . "<br>";
echo "cpf = ".$cpf . "<br>";
echo "produto = ".$produto . "<br>" ;
echo "status = ".$status . "<br>" ;
echo "total = ".$total . "<br>" ;
echo "data = ".$data . "<br>";
echo "ref = ".$ref. "<br>";
//Até aqui o ECHO recebe as informações
try{
$inseri= $pdo -> prepare (" INSERT INTO rico_vendas (email, ddd, telefone, cpf, produto, status, valor, data_cadastro, ref) VALUES (:email, :ddd, :tel, :cpf, :produto, :status, :valor, :data, :ref)");
$inseri -> bindValue(':email',$email);
$inseri -> bindValue(':ddd',$ddd);
$inseri -> bindValue(':tel',$telefone);
$inseri -> bindValue(':cpf',$cpf);
$inseri -> bindValue(':produto',$produto);
$inseri -> bindValue(':status',$status);
$inseri -> bindValue(':valor',$total);
$inseri -> bindValue(':data',$data);
$inseri -> bindValue(':ref',$ref);
$executa = $inseri -> execute();
if($executa){
echo 'Dados inseridos com sucesso';
}
else{
echo 'Erro ao inserir os dados';
}
}
catch(PDOException $e){
echo $e->getMessage();
}