Skip to content

Instantly share code, notes, and snippets.

@edvaldoszy
Last active January 27, 2016 00:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edvaldoszy/e035b2950aa7ea727f08 to your computer and use it in GitHub Desktop.
Save edvaldoszy/e035b2950aa7ea727f08 to your computer and use it in GitHub Desktop.
Arquivos index.php do primeiro tutorial de PHP do blog.
<?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