Category: PHP MySQL

PDO Connectivity Step 5

5. Delete Data <?php // include database connection file require_once 'dbconfig.php'; $database = new Connection(); $db = $database->openConnection(); // Code for record deletion if (isset($_REQUEST['del'])) { //Get row id $uid =...
READ MORE   >>

PDO Connectivity Step 4

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   >>

PDO Connectivity Step 3

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   >>

PDO Connectivity Step 2

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   >>

Recent Comments

    • Copyright © 2020 (Er. Shairy Kalra). All Rights Reserved