Question: Using a MVC model , codeignter and php, create a buy page and a restock page. The buy page should only allow user that have

Using a MVC model , codeignter and php, create a buy page and a restock page. The buy page should only allow user that have logged in using the username 'guest' and the restock page only for user with 'administer' from sql table. The sql table is called 'Customers' and has 'username' and 'password' as variables. Also a sql table called 'Stock' and variables with 'id' and 'quan'. The buy page should have an input which asks user how many of an item they want. How every many they want has to be decreased by in the stock sql table and updated. The restock page should ask user how many of id they want to restock and increase it by that amount in sql stock table. The url for buy page should be. shop/buy/Id (the number of id for an item the user wants to purchase). The url for restock page should be. shop/restock/Id (the number of id for an item the user wants to purchase).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!