Posts

Showing posts from May, 2021

PHP CRUD Application

       Implementing  CRUD Application in PHP What is CRUD? CRUD is an acronym for   C reate,   R ead,   U pdate and   D elete. CRUD operations are basic data manipulation for database.  In this tutorial we are going to implement queries for the following operations, such as Create (i.e. insert), Read (i.e. select), Update and Delete operations. In this tutorial we'll create a simple PHP application to perform all these operations on a MySQL database table in one place. Well, let's start by creating the table which we'll use in all of our example. CREATE TABLE users ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT , username VARCHAR (5 0 ) NOT NULL ,      password VARCHAR (5 0 ) NOT NULL ,      email VARCHAR ( 255 ) NOT NULL , phone VARCHAR ( 10 ) NOT NULL ) ;  To connect to the MySQL database server. Let's create a file named "config.php" and put the following code inside it. config.php <?php /* Database Details */ define ( 'DB