Broad Network


A Simple Conventional Web Development Project Description for PHP and MySQL

Conventional Web Development with PHP and MySQL – Part 3

Forward: In this part of the series, I give a simple project description for a conventional web development project.

By: Chrysanthus Date Published: 2 Aug 2012

Introduction

This is part 3 of my series, Conventional Web Development with PHP and MySQL. I assume you have read the previous part of the series, before reaching here. In this part of the series, I give a simple project description for a conventional web development project.

Project Description from the User’s Point of View
The project concerns a university library. We consider a hypothetical university library that sells only 8 types of books and 8 types of pens, only to students of the university. In order to buy a book or a pen the student must be a registered member of the library, and the student registers thought the web site of the library, which is what we shall build as part of the web development project. Of course the books and pens are sold at prices lower than what you will get in public bookshops.

In order to buy a book or a pen, the registered student logs into the site. After logging in, the student can buy one or more books and/or one or more pens using his email address. This email address is the one he has with the company PayPal or Moneybookers, that actually does the payment. In practice, withdrawing money from someone’s Paypal or Moneybookers account is more involving than this; however, I will not go into that.

Paypal or Moneybookers is a kind of intermediary bank. A student can have an account (some money) with the intermediary bank. A student (adult) registers with such an intermediary bank with his email address. If the student wants to buy something from a shop that has an account with the intermediary bank, the main thing he has to use is his email address, and money will be transferred from the student’s account to the account of the shop. Paypal is American based; Moneybookers is European based. Moneybookers is newer and at the moment, not as popular as PayPal. In my (writer) opinion Moneybookers is more secured than PayPal.

Registered and non-registered members can see all the items in the bookshop at the website. However, in order to buy an item, the student must be registered.

There are 5 HTML pages for the site: the home (welcome) page, the books page, the pens page, the registration (and login) page and the contact page. The books page displays 4 books; if the client (internet user) wants to see more, he clicks a button. The pens page also display 4 pens; if the client wants to see more pens, he clicks a button.

When a client (student) clicks an item (book or pen) on the web page, a window opens. The window that opens has an enlarged image of the item, detailed description of the item and an input text control for him to type in the number of items he wants.

The site will have a shopping cart displayed in the books and pens pages. The shopping cart displays the items the client has selected for purchase. It displays the unit price and total price for each item selected. It also displays the grand total price for all items selected.

Note: The word, item, in this project, refers to a book or a pen.

Technical Requirements
You will carry out the project using a personal web server, a MySQL5 server and your personal computer, which will be referred to as, localhost.

For simplicity, each HTML page will have a Header and Content (header and article) layout. The links to the different pages will be in the header in one horizontal line. There will be an aside element on the right of the content area of the books and pens pages. This aside element will have the shopping cart and a button to place an order.

The home (index) page will have just general information about the site. In practice, it should have a few products (items) the bookshop is selling. The books page will display 4 books in small sizes. It will have a hyperlink titled, More, so that when the client clicks it he will see more books. The pens page will be arranged in a similar way.

The database will have a products table. The products table will have a category column. The possible values for this column are Book and Pen; just 2 categories. The first 4 items in the books or pens HTML page are the corresponding first 4 items in the concerned category in the products table. However, the first 4 items will be hard coded in the HTML page, so that search engines can know some of what you are selling. This is because, in principle, search engines read only HTML elements and do not read scripts or databases.

I will not explain or give you the code for the contact HTML page. I will also not give you the PHP script corresponding to the contact page. These two are simple to code, if you have covered the prerequisite mention in the first part of this series.

You need one PHP script at the server to handle purchase (when the client places an order for items). You need one PHP script for the HTML contact page, which I have said I will not talk about in this series. You need one PHP script to handle more items from either the HTML books page or the HTML pens page. You need one PHP script to handle login. You need one PHP script to handle registration. Remember, the login and registration Forms are in the same HTML page in this series.

Connection to server will be non-persistent. So connection will only exist while a PHP script runs from start to end.

Each page will have a login hyperlink. After the user has logged in, ECMAScript (JavaScript) will turn it into logout hyperlink.

When the client clicks an item, it is ECMAScript that will open the new window (for item details) at the browser. When the client closes the opened window it is still ECMAScript that will send any necessary information from the window to the shopping cart at the browser. So, the opening of the window and transmission of information between the window to the shopping cart, is done at the client’s browser without the involvement of the server; that is a bit of Active Client Technology.

Well, above are the simple web development project requirements from the user’s point of view and from the technical point of view.

That is it for this part of the series. We stop here and continue in the next part.

Chrys

Related Links

Major in Website Design
Web Development Course
HTML Course
CSS Course
ECMAScript Course
NEXT

Comments

Become the Writer's Fan
Send the Writer a Message