/* FB instanr*/

PHP AJAX CRUD using mysqli - View or Read

Live Demo
PHP AJAX CRUD using mysqli - View or Read
Source Code
Hello, Every one In this tutorial of View or Read CURD Application system by using PHP and Msqli With ajax. you will learn how can you Read or Viw or Select data From Mysql Database table by using php procedural form programming method and You can learn how to table refresh without page refresh by using ajax response. So You can also check demo online. We have also provide demo link And source code download link with this post. In this tutorial we have seen not only how can you view data from mysql Database even you can learn how to refresh data by using Ajax Response Without page Refresh without page refresh PHP procedural form method. So our need to do this a table. we have use Bootstrap & Popeller table style classes, This is good concept for user friendly of Advance technology. you can also use in your web Development project best of luck. Ajax response by view data or select data form mysql database table. So If you use Bootstrap & Propeller even we not use browser default alert, We use sweet alert for this nice alert for user friendly. so must be loaded include bootstrap's css and js and Propeller's css and js files by using Download or CDN link for these files. this We have create Database db_phpajax into table tbl_employee, already We have also provide sql file with source code or see please in this post. So 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 update or change rows' data into Mysql table by using PHP AJAX MySqli. So friend please share this my youtube video, subscribe my youtube channel and share this post with your friends. Thanks Next Tutorilas Link these:
    Files structure Fellow:
  • Application root folder
    • upload
    • //This Folder into upload files
    • action.php
    • //This file will handle for Insert data to Database Table we used to our previews tutorial
    • index.php
    • //This file for table html markup for view Data
    • select.php
    • //This file for view Data from Database Table

Sourse Code:

  • Select.php - This file for view Data from Database Table

  • action.php - This file will handle for Insert data to Database Table we used to our previews tutorial

  • <?php 
      $connect = mysqli_connect("localhost","root","","db_phpajax");
    
      if (isset($_POST['action'])) {
        if ($_POST['action'] == 'create') {
          $firstName = mysqli_real_escape_string($connect,$_POST['firstName']);
          $lastName = mysqli_real_escape_string($connect,$_POST['lastName']);
          $designation = mysqli_real_escape_string($connect,$_POST['designation']);
    
          $imageName = img_upload($_FILES['image']);
    
          $query = "INSERT INTO tbl_employee(fName,   lName,designation,image) VALUES('".$firstName."','".$lastName."','".$designation."','".$imageName."')";
          if (mysqli_query($connect,$query)) {
            echo 'create';
          }
        }
      }
    
      function img_upload($file){
        $extention = explode('.', $file['name']);
        $newNmae   = rand().'.'.$extention[1];
        $designation = 'upload/'.$newNmae;
        move_uploaded_file($file['tmp_name'], $designation);
        return $newNmae;
      }
    ?>
    
  • index.php - This file for view Data from Database Table

  • 
    
  • Database file sql

  • --
    -- Database: `db_phpajax`
    --
    -- --------------------------------------------------------
    --
    -- Table structure for table `tbl_employee`
    --
    CREATE TABLE `tbl_employee` (
      `id` int(11) NOT NULL,
      `fName` varchar(255) NOT NULL,
      `lName` varchar(255) NOT NULL,
      `designation` varchar(255) NOT NULL,
      `image` varchar(255) NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    
    --
    -- Dumping data for table `tbl_employee`
    --
    
    INSERT INTO `tbl_employee` (`id`, `fName`, `lName`, `designation`, `image`) VALUES
    (37, 'Roman ', 'Mondol', 'Teacher ', '22230.jpg'),
    (38, 'Aslam ', 'Hasib', 'Wordpress Developer', '23895.png'),
    (39, 'Md Ibrahim ', 'Islam', 'Writer', '10512.png'),
    (52, 'Aslam', 'Khan', 'Media Expert', '15945.png'),
    (59, 'Programmer', 'Rayhan Mondol', 'JAVA and PHP Developer', '28556.jpg');
    
    --
    -- 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=60;
    /*!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)