Following is best exmple add,update and delete record using PDO : Download project code l ink : https://drive.google.com/open?id=0BxmTZPVcu72fZy01VjZxaFpiNTg Create following file structure : 1-connection.php, 2-header.php, 3-footer.php 4-add.php, 5-edit.php, 6-add-action.php, 7-home.php, 8-delete.php now connection file created connection bewteen mysql and php,he DSN (Data Source Name)contains the driver name (mysql), he last thing you might have noticed is that we wrapped our object initialization attempt in a try-catch block. PDO will throw a PDOException following connection are created connection :- Code: <?php /* * Start:: Database connection::- */ $hostname="localhost"; $username="root"; $password=""; $dbname="testPDO"; try { $db = new PDO("mysql:host=$hostname;dbname=$dbname;charset=utf8mb4", $username, $password); } catch (PDOException $e) { print ...