Skip to content

Instantly share code, notes, and snippets.

View OsmanAtGithub's full-sized avatar

OsmanAtGithub

View GitHub Profile
@OsmanAtGithub
OsmanAtGithub / pdocrash.php
Created September 13, 2020 22:24 — 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