Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask PHP Expert

Develop an e-commerce Web site in PHP and a MySQL database.

Use PDO to communicate with the DB and not standard MySQL queries. Use Object-Oriented Programming.

Create classes for products and clients.

Create a database and insert data for products and categories (via phpMyAdmin interface).

The page index.php should display the complete list of products  and a drop-down list to filter by category.

Every product has the following attributes:

  • Name
  • Description
  • Image
  • Price

One product can be associated with one or more categories.

The page client.php displays a simple form to log in as a client and has a possibility for a client to create an account.

The authentication form should validate if the user and password match.

Assignment:

Part 1: The system should be able to secure creating client accounts, integrate the notion of administrator and have a shopping cart. You should use PDO class for communications with the database.

For this phase, we'll have to have a class for:

  • Applications
  • Clients/administrators
  • Shopping cart

You will have to update your database to integrate administrators. Use the same table as for clients. You should find a solution to avoid mixing up clients and administrators.

The page index.php should have a new element, Add to cart button.

The button should allow an authenticated client to add an item to his cart. The items should be stocked in a session variable to allow for displaying all the items in the cart to the client.

So you should have a new page panier.php (French for "cart") that will display the list of products selected by the client. From this same page, the client should be able to modify the quantity that will be set to 1 by default. If the client modifies the quantity to 8, for ex, this quantity should be saved as well and displayed correctly when the page is refreshed.

The following message should be displayed in the upper part of the page: "Welcome First Name, Last Name".

As for administrator, we should once again use the client authentication form, but as long as administrators cannot create accounts for themselves, the accounts should be created in advance in the database.

To secure the password, it should be generated with the help of PHP "crypt" function including a unique salt for every user. This applies both to clients and administrators. For a client, it should be done automatically in the account registration form whereas for administrator it can be entered directly into the database. So we will have a new page admin.php.

Once authenticated, the administrator should be able to add, modify and delete a product.

Part 2: The Add to cart button should allow displaying a page dedicated to the selected product, produit.php.

You should use "regex" to reprepare the URTL dynamically for each of the products including new ones that could be created.

The name of the product should be included in the URL.

The Add to cart button should now add items in the session variable without refreshing the page (using AJAX). A message confirming that the item has been added to the cart should be displayed. AJAX should be used as well for creating client accounts.

When a client enters his e-mail, we should validate with AJAX if the e-mail is available and does not exist in the DB.

A message in green should appear to the right of the form if the e-mail is available and a message in red if not.

To secure the account, we should integrate a captcha.

PHP , Programming

  • Category:- PHP
  • Reference No.:- M9826

Have any Question?


Related Questions in PHP

Final project assignment -requirements specifications -1

FINAL PROJECT ASSIGNMENT - REQUIREMENTS / SPECIFICATIONS - 1. For the final project, you will have to make good use of your CMS using PHP and MySQL for the content delivery. You will have to be able to deliver the conten ...

Question continue to build on the skills of providing web

Question: Continue to build on the skills of providing Web page content and structure with HTML and Web page style and layout using CSS. Demonstrate the skill of creating a dynamic Web page that includes JavaScript clien ...

Question using the course software and week one template as

Question: Using the course software and Week One Template as a starting point, create a new HTML webpage and include the following: • Write the code to display your name in the largest-size heading element. • Write the m ...

Question develop a 5-6 page word document that describes

Question: Develop a 5-6 page Word document that describes the design for a small Web site that meets the following specifications. 1. The Web site includes four or more Web pages designed according to current usability g ...

In php write a simple addtion calculator that reads in two

In PHP write a simple addtion calculator that reads in two values and then add them together and display the output. Be sure to validate both inputs and ensure that it can add 0+0 = Sum: 0. The user should be able to inp ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As