4. Update Data <?php // include database connection file include_once 'dbconfig.php'; $database = new Connection(); $db = $database->openConnection(); if (isset($_POST['upd'])) { // Get the userid $userid =... READ MORE >>
3. Read Data - Index File <?php include_once 'dbconfig.php'; try { $database = new Connection(); $db = $database->openConnection(); //echo "Connection created successfully"; $database->closeConnection(); } catch (PDOException... READ MORE >>
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 >>
Recent Comments