Month: December 2021

PHP REST API CRUD – Step 9

Step 9 Update Data After view/read user, now we update the user data. For this we will add update functions in user.php of object folder //Update User Data public function update($id) { $query = "update " . $this->table . "...
READ MORE   >>

PHP REST API CRUD – Step 8

Step 8 Create API for read single and all data Create a new file called read_user.php in user folder and Following steps to be performed for this We need to set headers on this new file. 2.  Connect to database and register...
READ MORE   >>

PHP REST API CRUD – Step 7

Step 7 Read Data After successfully insertion of user, now we read the complete data or single user data. For this we will add 2 functions in user.php of object folder. // Read Data public function read() { //query to read all...
READ MORE   >>

PHP REST API CRUD – Step 6

Step 6 Output for insert user To test for the successful creation of a data, open POSTMAN. Enter the following as the request URL http://localhost/PHP REST API CRUD with JWT Authentication\api\User \create_user.php Click the "form-data"...
READ MORE   >>

Recent Comments

    • Copyright © 2020 (Er. Shairy Kalra). All Rights Reserved