This is a demo app that allows you to manage products (add and delete products) using separate front-end and back-end.

The front-end is created using HTML/CSS/JavaScript and is accessible from the index.html page

The front-end calls a simple rest API which was created in PHP, with two end-points: get and saveApi. When index.html page is loaded, it hits the get endpoint which reatrieves all the products in the database.

When Add is clicked, it loads the addproduct.html page which is a form that ads a new product. When saved is clicked, it hits the saveApi endpoint with an object created from the form. The saveApi endpoint gets the product data and saves it to the database.

View Demo See The Code