I am creating a page that saves values in the MySql database using PDO and is not writing the data. I'm using the following code:
<?php
$conexao = new PDO('mysql:host=localhost;dbname=dbTeste', 'root', '');
$query = "INSERT INTO names(nome, email) VALUES('Wade', '[email protected]')";
$stmt = $conexao->prepare($query);
$stmt->execute();
?>
But do not save the data in the database.