PHP: PDO::__construct

PHOTO EMBED

Fri Nov 26 2021 19:23:46 GMT+0000 (UTC)

Saved by @somvirmalik2998 #php

<?php
/* Connect to a MySQL database using driver invocation */
$dsn = 'mysql:dbname=testdb;host=127.0.0.1';
$user = 'dbuser';
$password = 'dbpass';

$dbh = new PDO($dsn, $user, $password);

?>
content_copyCOPY

https://www.php.net/manual/en/pdo.construct.php