Skip to content

Instantly share code, notes, and snippets.

View farahhaddar's full-sized avatar

farah haddar farahhaddar

View GitHub Profile
@farahhaddar
farahhaddar / pdocrash.php
Created April 27, 2021 19:04 — 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