/* FB instanr*/

PHP OOP with AJAX CRUD using mysqli - View or Read

Live Demo
PHP OOP with  AJAX CRUD using mysqli - View or Read
Source Code
hi every one, this tutorial of View or Read CURD system by using PHP OOP(Object Oriented PHP) programming and Msqli Database extention With jquery ajax response. so in this tutorial you will learn how can you Read or View from Mysql Database table by using object oriented form programming style and without page refresh using ajax response. So You may also check demo online.Our have also provide demo link And source code download link with this tutorial. First we go to index.php file already I html markup for data table. Now we will code for get data from database table jquery code with jQuery ajax response by get data after response jquery call back function. Now we will show database table rows on table by table id, So Any time we can get data without page refresh just call our function. When document is ready so our function call and fetch data by using ajax response. Our action request to action.php file if action condition then will insert and we have create a class employee.php file this file will be try to database connection and fetch query execute the return data. so just action.php file result echo then we get rows data. php object oriented form programming is most populer for easy to handle any project. So if you use this programming style then so easy to develop any project for you more than php procedural form coding style. Now do this and Fellow our video tutorial We have also provide youtube Video in this post. In next video tutorial we will make discussing on how to select rows from Mysql table by using AJAX response. So please share my post and go to my youtube channel and subscribe and share videos with your friends. Thanks Next Tutorilas Link these:
    Files structure Fellow:
  • Application root folder
    • upload
    • //This Folder into upload images
    • Employee.php
    • //This file will handle for database connection query execute
    • action.php
    • //This file will handle for Select Rows, Insert data into Database Table
    • index.php
    • //This file for Create form, view table

Sourse Code:

  • Employee.php - database connection and database query

  • <?php 
      class Employee{
        public $connect;
        private $host = "localhost";
        private $userName = "root";
        private $userPass = "";
        private $BDName   = "employee_account"; 
    
        public function __construct(){
          $this->BDConnect();
        }
    
        public function BDConnect(){
          $this->connect = mysqli_connect($this->host,$this->userName,$this->userPass,$this->BDName);
        }
        public function query_execute($sql){
          return mysqli_query($this->connect,$sql);
        }
        public function upload($file){
        $extention =  explode('.', $file['name']);
        $newName =  rand().'.'.$extention[1];
        $destination = './upload/'.$newName;
        move_uploaded_file($file['tmp_name'], $destination);
        return $newName;
        }
    
      }
    
    ?>
    
  • action.php

  • 
    
  • index.php

  • 
    
  • Database file sql

  • 
    --
    -- Database: `employee_account`
    --
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table `tbl_employee`
    --
    
    CREATE TABLE `tbl_employee` (
      `id` int(11) NOT NULL,
      `name` varchar(255) NOT NULL,
      `salary` varchar(255) NOT NULL,
      `sex` varchar(11) NOT NULL,
      `image` varchar(50) NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    
    --
    -- Dumping data for table `tbl_employee`
    --
    
    INSERT INTO `tbl_employee` (`id`, `name`, `salary`, `sex`, `image`) VALUES
    (14, 'Tisha', '1500', '2', '25078.jpg'),
    (15, 'Programmer Rayhan Mondol', '50,000', '1', '23031.jpg'),
    (25, 'Rakib Ali', '20000', '1', '32308.png');
    
    --
    -- Indexes for dumped tables
    --
    
    --
    -- Indexes for table `tbl_employee`
    --
    ALTER TABLE `tbl_employee`
      ADD PRIMARY KEY (`id`);
    
    --
    -- AUTO_INCREMENT for dumped tables
    --
    
    --
    -- AUTO_INCREMENT for table `tbl_employee`
    --
    ALTER TABLE `tbl_employee`
      MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;
    /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
    /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
    /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
    
    
    

    Browse by Category

    php Ajax jQuery Codeigniter html css javascript

    Hi there! I am Rayhan Mondol, a PHP & JAVA Developer and ICT task is my programming blog. I'm fond of developing modern web applications. Contact me, I accept the paid task

    Latest Article

    post thumbnail

    Ajax Shopping Cart Customer Order View & account Update by using PHP OOP PDO(E-Commerce website-part 10)

    post thumbnail

    customer accout logout by using PHP OOP, PDO,COOKIE,AJAX(E-Commerce website-part 9)

    post thumbnail

    Customer Account Login by using PHP OOP PDO,AJAX (E-Commerce website-part 8)

    post thumbnail

    Customer Account Create by using PHP OOP PDO (E-Commerce website-part 7)

    post thumbnail

    Remove product from cart by using PHP OOP PDO(E-Commerce website-part 6)

    post thumbnail

    Ajax Shopping Cart update or Edit by using PHP OOP PDO (E-Commerce website-part 5)

    post thumbnail

    Ajax Shopping Cart View and calculate by using PHP OOP PDO (E-Commerce website-part 4)

    post thumbnail

    Drag and Drop Product Add to Cart by using PHP OOP PDO Ajax Jquery - E-Commerce project- (part-3)

    post thumbnail

    Product Add to Cart using PHP OOP PDO Ajax JQuery - E-Commerce project- (part-2)

    post thumbnail

    Create Dynamic Tabs using PHP OOP PDO - E-Commerce project- (part-1)

    post thumbnail

    CodeIgniter AJAX CRUD using Bootstrap Modal - Delete

    post thumbnail

    CodeIgniter AJAX CRUD using Bootstrap Modal Edit or Update

    post thumbnail

    CodeIgniter AJAX CRUD using Bootstrap Modal Read or view

    post thumbnail

    CodeIgniter AJAX CRUD using Bootstrap Modal-Create

    post thumbnail

    CodeIgniter AJAX CRUD(setup removing index.php from url)