3
I am creating a page that saves values in the Mysql database using PDO and is not writing the data. I am 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 it does not save the data in the database.
places a space after
names
(...) and another afterVALUES
(...)– Ivan Ferrer