Skip to content

Instantly share code, notes, and snippets.

View PershinAY's full-sized avatar

Artem Pershin PershinAY

View GitHub Profile
@PershinAY
PershinAY / pdocrash.php
Created April 26, 2018 15:45 — forked from bradtraversy/pdocrash.php
PDO & Prepared Statements Snippets
<?php
$host = 'localhost';
$user = 'root';
$password = '123456';
$dbname = 'pdoposts';
// Set DSN
$dsn = 'mysql:host='. $host .';dbname='. $dbname;
// Create a PDO instance