PDO – Insert, update, and delete records in PHP – BrainBell

PHOTO EMBED

Mon Aug 21 2023 20:27:09 GMT+0000 (Coordinated Universal Time)

Saved by @mvieira

<?php
 $user = 'Brain';
 $pass = 'Bell';
 $dsn  = 'mysql:host=localhost;dbname=brainbell;charset=utf8';
 $dbh  = null;
 try {
  $dbh = new PDO ($dsn, $user, $password);
 } catch (PDOException $e) {
  echo 'Connection Failed: '.$e->getMessage();
  exit;
 }
content_copyCOPY

https://brainbell.com/php/pdo-crud-basics.html