Category: PHP MySQL
-

User Authentication using REST API and JSON Web Tokens (JWT) – Step 5
Simple Login via Unique ID Create a new Single Record fetch function inside the user.php file inside object folder and use the following code
-

User Authentication using REST API and JSON Web Tokens (JWT) – Step 4
Create user folder and Create a new file called create_user.php and Following steps to be performed for this 1. We need to set headers on this new file so that it will only accept JSON data from a specific URL. 2. Connect to database and register table 3. Assign submitted data to object properties 4. Use the create…
-

User Authentication using REST API and JSON Web Tokens (JWT) – Step 4
How to check output using POSTMAN Step 1 : To test for the successful creation of a data, open POSTMAN Step 2 : Fill the below URL and use POST method while inserting data in DB http://localhost/rest-api-authentication/api/user/create_user.php Step 3 : Click the “Body” tab. and Click “raw”.Enter this JSON value: { “name”:”shairy”, “email”:”shairy@gmail.com”, “password”:”shairy” }…
-

User Authentication using REST API and JSON Web Tokens (JWT) – Step 3
Create the user object class Create the objects folder inside api folder and create a new file called user.php <?php // ‘user’ object class User { private $conn; private $table = “register”; // object properties public $id; public $name; public $email; public…