Posts

BUILDING A SIMPLE REST API FOR INVENTORY MANAGEMENT WITH PHP

Image
INTRODUCTION : Representational State Transfer (REST) is an architectural style that defines a set of constraints to be used for creating web services. REST API is a way of accessing web services in a simple and flexible way without having any processing. There are numerous types of APIs, making it difficult for new developers to differentiate between each kind. In particular, Representational State Transfer (REST) is a software architectural style that developers apply to web APIs. REST APIs provide simple, uniform interfaces because they can be used to make data, content, algorithms, media, and other digital resources available through web URLs. The method is the type of request you send to the server. The four main resource methods that are associated with REST APIs are: GET:  This method allows for the server to find the data you requested and sends it back to you. PUT:  If you perform the ‘PUT’ request, then the server will update an entry in the database. POST:  This method permi

CRUD Operation with PDO database connection

Image
Databases are everywhere and there is no practical PHP application that could exist without a database. From the very beginning, PHP offers several ways of interfacing with all popular DBMS. For instance, two popular ways of interfacing with MYSQL database are mysql and mysqli. Over years, databases have come a long way and now several different vendors offer popular DBMS that power modern PHP apps. To standardize and streamline development practices, PHP introduced PHP Data Objects (PDO) in PHP 5.1. These objects are used to setup PDO database connections. PDO is a database access layer which provides a fast and consistent interface for accessing and managing databases in PHP applications.  Every DBMS has specific PDO driver(s) that must be installed when you are using PDO in PHP applications.   Follow the given steps : STEP 1 : Establish a connection with Database     Create a new file name as connection . php in project directory /var/www/html   now for establishing con

Steps to Install the process of PHP with apache server and Mysql server in ubuntu OS

Image
So lets get start of discussion to how we can install PHP with Apache server and Mysql server in Ubuntu. In this Blog I'm gonna show step by step installation or instruction that how you can install PHP with Apache server and Mysql server in Ubuntu. First of all Open your Ubuntu operating system and open in terminal. In the terminal We're going to write commands to easily install apache server. 1. Installation of Apache server : lets start with terminal and for intial step is to install of apache server and command to install server is : chirag@chirag-Virtualbox : $ sudo apt install apache2 and then press enter it show a command to enter password and then installation starts     After some installation it will ask yes or no question you just write a yes and then further or remaining installation proceeds and then its start downloading files in machine  Now when downloading is complete you have successfully install with Apache server in your Ubuntu machine  2. Test Apache server