Last active
January 27, 2016 00:44
-
-
Save edvaldoszy/e035b2950aa7ea727f08 to your computer and use it in GitHub Desktop.
Arquivos index.php do primeiro tutorial de PHP do blog.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once "src/Sys/Conexao.php"; | |
use Sys\Conexao; | |
try { | |
$conexao = new Conexao("localhost", "sistema_login", "root", ""); | |
$conexao->executar("INSERT INTO usuarios (nome, email, senha, cadastro) VALUES (?, ?, ?, ?)", array('Administrador', 'admin@gmail.com', md5('123'), date('Y-m-d'))); | |
} catch (\PDOException $ex) { | |
echo $ex->getMessage(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment