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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started