2. Insert Data <?php // include database connection file include_once 'dbconfig.php'; $database = new Connection(); $db = $database->openConnection(); if (isset($_POST['insert'])) { // Posted Values $name = $_POST['name']; ... READ MORE >>
DB Config File <?php Class Connection { private $server = "mysql:host=localhost;dbname=pdo"; private $user = "root"; private $pass = ""; private $options = array(PDO::ATTR_ERRMODE =>... READ MORE >>
PHP 5 and later can work with a MySQL database using MySQLi and PDO (PHP Data Objects). Both MySQLi and PDO have their own advantages but PDO will work on 12 different database systems, whereas MySQLi will only work with MySQL databases. PDO is... READ MORE >>
Recent Comments