Posts

Showing posts from February, 2021

PHP MySQL Pagination using Bootstrap4

Image
How to implement PHP MySQL Pagination using Bootstrap4     Pagination is actually the process of printing database table records in a page wise. Here is the example of pagination code using PHP and Bootstrap-4 with Next and Previous buttons. Create the following Database and table in MySQL in order to run the below given code. Create Database create database usersdb ; Create Table CREATE TABLE ` users ` ( ` id ` int ( 11 ) NOT NULL auto_increment , `user name ` varchar ( 100 ) NOT NULL , ` age ` int ( 3 ) NOT NULL , ` email ` varchar ( 100 ) NOT NULL , PRIMARY KEY ( ` id ` ) ); Create pagination.php in server of your choice like XMPP or WAMP and copy and paste the code and run the file. pagination.php TOP <!DOCTYPE html> <html> <head> <meta http-equiv= "Content-Type" content= "text/html; charset=utf-8" /> <title> Datatable with mysql </title> <script type

Basic PHP CRUD Application

Image
Simple PHP and MySQL application for performing crud operations.   It is a simple core PHP application which performs all the crud operations. What is CRUD? CRUD is stands for Create Read Update and Delete are the major operations performed on database table for managing data.  Step-1:     Create following database and table in the MySQL.       CREATE database usersdb; CREATE TABLE `users` ( `id` int ( 11 ) NOT NULL auto_increment , `name` varchar ( 100 ) NOT NULL , `age` int ( 3 ) NOT NULL , `email` varchar ( 100 ) NOT NULL , PRIMARY KEY ( `id` ) );         Step-2:   Create one new folder with name 'CRUDApp' in the server and save the  following files and run the index.php config.php <?php $dbHost = 'localhost' ; $dbName = 'usersdb' ; $dbUsername = 'root' ; $dbPassword = '' ; $mysqli = mysqli_connect ( $dbHost , $dbUsername , $dbPassword , $ dbName ); ?>   Step-3:   Create