Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using a MVC model, code a search page, buy page and a restock page. For the search page, if username 'administrator' and pass 'pass' has

Using a MVC model, code a search page, buy page and a restock page.

For the search page, if username 'administrator' and pass 'pass' has logged in, there should be a href link for the restock page with the id of a wanted product. If username 'user' and pass 'pass' has logged in, there should be a href link for the buy page with the id of a wanted product.

The buy page should be accessed by shop/buy/Id. The id is the number given to a product from a sql table. The buy page should have an input box where the user types in the number of Id they want. The number should then decrement the amount of Id in sql table. This page should only be accessed if the user has logged in as username "user" and password "pass"

For the restock page it should be accessed by shop/restock/Id. The id is the number given to a product from a sql table. The restock page should have an input box where the user types in the number of Id they want to restock. The number should then increment the amount of Id in sql table. This page should only be accessed if the user has logged in as username "administrator " and password "pass"

The sql table has a name of 'Customers' and the properties are 'username', 'password'

The sql table has a name of 'Stock' and the properties are 'product', 'Id', 'no'

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Concepts, Theories, And Applications

Authors: Shui Yu, Song Guo

1st Edition

3319277634, 9783319277639

More Books

Students also viewed these Databases questions

Question

1. Who will you assemble on the team?

Answered: 1 week ago

Question

4. Who would lead the group?

Answered: 1 week ago