PHP Assignment Document

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 37

WEB APPLICATION FOR KSPORT

SPORTS CLUB

MOHAMED FAROOK MOHAMED FAZRIN


UNIT TITLE: PROGRAMMING IN PHP (KD/HNDCOM/39/16)
Web application for KSport sports clubIndividual

Assignment Brief
This assignment is based on Ksport (Popular Sport club) need to implement a web site to market
their sport facilities and memberships to the public. Since sport facilities, membership types and
prices change frequently club is expecting to have a dynamic web site to manage the content in
an effective way.

Following are some of the requirements to be fulfil by the new system

1. Members are able to log into the system by using a username and password given at their
registration.
2. Only the registered members can book tickets, badminton or tennis courts, billiard tables
etc.
3. Before making the reservation, members are able to check the availability
4. Public to make a request to register as a member.
5. All the facilities are organized according to the related sport.
6. Administrator is able to manage all the sport, facilities, events and membership details.
7. Administrator login is secured one.
8. Proper error handling.

1
Web application for KSport sports clubIndividual

Acknowledgment

I am using this opportunity to express my gratitude to everyone who supported me throughout


the assignment. I am thankful for their aspiring guidance, invaluably constructive criticism and
friendly advice during the assignment work. I am sincerely grateful to them for sharing their
truthful and illuminating views on a number of issues related to the assignment.

I express my warm thanks to Mrs. Anjali Kulasingha for her support and guidance.

Thank You.

2
Web application for KSport sports clubIndividual

Executive Summary
This report is mainly focused on KSport (Sport club), who are facing problems in the business.
This report will provide suitable solutions for the problems of KSport. The proper web
application is the main solution for KSport. The solutions are explained in detail in this project.
And some other recommendations also given in this report to improve day to day business, All
the business-related problems should be solved in highly effective way and lower in cost. This
project also follows the same manner with long term planning to improve the business.

3
Web application for KSport sports clubIndividual

Table of Contents
Assignment Brief.................................................................................................................1

Acknowledgment.................................................................................................................2

Executive Summary.............................................................................................................3

Task 01.................................................................................................................................7

Task 02.................................................................................................................................9

Detailed requirements specification................................................................................9

Task 03...............................................................................................................................12

Step 01 Strong entities...................................................................................................13

Step 02 No weak entity...............................................................................................14

Step 03 One to one mapping.......................................................................................14

Task 04...............................................................................................................................15

Task 06...............................................................................................................................19

Conclusion.........................................................................................................................21

References..........................................................................................................................22

Appendix 01.......................................................................................................................23

Gantt Chart.........................................................................................................................23

Appendix 02.......................................................................................................................25

Test Case Outputs (Screen Shots)..................................................................................25

Appendix 03.......................................................................................................................34

User feedback reports from various users.....................................................................34

Web Application Evaluation Form - 01.....................................................................34

Web Application Evaluation Form - 02.....................................................................35

Web Application Evaluation Form - 03.....................................................................36

Web Application Evaluation Form - 04.....................................................................37

4
Web application for KSport sports clubIndividual

Table of Figures
Figure 1 ER Diagram for KSport web Application Database............................................12
Figure 2 user table on database..........................................................................................13
Figure 3 sports table on database.......................................................................................13
Figure 4 booking table on database...................................................................................14
Figure 5 Coding with proper indentation...........................................................................15
Figure 6 Proper Names for Admin Pages..........................................................................15
Figure 7 Proper Names for Webpages...............................................................................16
Figure 8 Proper Names for functions.................................................................................16
Figure 9 Suitable Names for Variables..............................................................................17
Figure 10 Sutable Comments in specific places...............................................................17
Figure 11 Using functions to reuse the code......................................................................18
Figure 12 Using arrays to fetch database...........................................................................18
Figure 13 Using Loops to fetch multiple lines of data......................................................18
Figure 14 Epected Gantt Chart..........................................................................................23
Figure 15 Actual Gantt Chart.............................................................................................24
Figure 16 Registration data stored to database successfully.............................................25
Figure 17 Email Id already registered...............................................................................25
Figure 18 Member Index Page after login.........................................................................26
Figure 19 Invalid username or Password...........................................................................26
Figure 20 Admin Manage page after admin login.............................................................27
Figure 21 Selected date already booked............................................................................27
Figure 22 Selected game Available....................................................................................28
Figure 23 Please Login before booking.............................................................................28
Figure 24 Selected Sport Booked Successfully.................................................................29
Figure 25 Search Member details......................................................................................29
Figure 26 Search Booking details......................................................................................30
Figure 27 Update Member details.....................................................................................30
Figure 28 Member details deleted succeefully..................................................................31

5
Web application for KSport sports clubIndividual

Figure 29 Booking details updated....................................................................................31


Figure 30 Booking details deleted successfully.................................................................32
Figure 31 New Sport added...............................................................................................32
Figure 32 Sport deleted......................................................................................................33
Figure 33 Sport Updated....................................................................................................33

6
Web application for KSport sports clubIndividual

Task 01
A Web server is a program that uses HTTP (Hypertext Transfer Protocol) to serve the files that
form Web pages to users, in response to their requests, which are forwarded by their computers'
HTTP clients. Dedicated computers and appliances may be referred to as Web servers as
well[ CITATION Mar17 \l 1033 ].

PHP: PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source
general-purpose scripting language that is especially suited for web development and can be
embedded into HTML[ CITATION PHP17 \l 1033 ].

Ruby: A dynamic, open source programming language with a focus on simplicity and
productivity. It has an elegant syntax that is natural to read and easy to write[ CITATION
Rub17 \l 1033 ].

ASP. NET: ASP and ASP.NET are server side technologies. Both technologies enable computer
code to be executed by an Internet server. When a browser requests an ASP or ASP.NET file, the
ASP engine reads the file, executes any code in the file, and returns the result to the
browser[ CITATION W3S17 \l 1033 ].

Table 1 Comparison Between Three Popular Server side languages

Objectives PHP RUBY ASP .NET


Website http://www.php.net http://www.ruby- http://www.asp.net
lang.org/
Cost Free Free Free
Syntax C-Like, Similar to Unique Varies
Perl
API PHP Manual Ruby Core MSDN
Reference
License PHP License Python License Microsoft
Usage 82.6% 0.6% 15.1%
[ CITATION OZZ17 \l 1033 ]

The most popular server-side language on the web is PHP, it is designed to pull and edit
information in the database. Its most commonly bundled with databases written in the SQL

7
Web application for KSport sports clubIndividual

language. PHP was designed strictly for the web and remains one of the most widely used
languages around. Its easy to install and deploy, is staying competitive with lots of modern
frameworks, and is the foundation for a number of content-management systems. Therefore,
Ksport website developed by using PHP as a server language.

8
Web application for KSport sports clubIndividual

Task 02
Detailed requirements specification
Req. Requirement Justification Test Out Come
No. Description Case
No
01 Registration Registering should 01,02 Registered details
allow public visitors to successfully sent to
give request to register user database, since
their details to become email address is a
a member of the Ksport unique for each
club, it will store details different users cannot
of member such as id, register two members
user id, username, with same email
address, city, post code, address
email, password, sex
and type
02 Login login through username 03,04,0 For each valid email id
and password with 5 and password page
different types of directed to according to
privileges, login details user type privilege,
should be retrieved invalid email and
from the database and password produce
validate by matching proper error message
with input username &
passwords
02.1 Member Member able to login 03 Page directed to
Login Using member member index page
username and password and allow member to
use member options
02.2 Admin Admin should be able 05 Page directed to
Privilege to add, modify and member index page
logins delete existing member and allow admin to use
details and sports member options
details
03 Adding Admin should be able 16 Admin can add new
Details to add sports to the sport to the sport
(Admin) database database
04 Deleting Admin should be able 13,17 Admin can delete any
Details to delete any existing existing member
(Admin) sport or existing details from the
member from the database
database
05 Updating Admin should be able 12,18 Admin can modify the
Details to modify any existing existing member

9
Web application for KSport sports clubIndividual

(Admin) sport or member details details


in the database
06 Search Members should be 06,07 Members are able to
(Member) able to check the check the available
availability of a dates for selected game
particular sport on and book it
selected date before
booking it
06.1 Search Admin Should be able 10,11 Admin can search
(Admin) to search the exiting existing member
member details and details and booking
booking details from details for view, update
the database and delete purpose
07 Public Public visitor should be 01 Any new visitor is able
able to view the website to give request to
information and should become a member by
be able request for registering their details
member registration
08 Booking Only Registered 08,09, Only selected members
members should be able 14,11, are able to book the
book any sport on 15 sports but anyone can
available days, admin check the availability
should manage all the of a particular sport on
booking details specific date, admin
can search delete and
modify the existing
booking details
09 Interface User friendly interface 01-18 User friendly user
for easy navigation interface make all the
between pages, Visitors task very easy to
should be able to navigate and get the
navigate the pages proper output results
easily to take the
maximum advantage of
using the website

10
Web application for KSport sports clubIndividual

Task 03

Figure 1 ER Diagram for KSport web Application Database

11
Web application for KSport sports clubIndividual

Step 01 Strong entities


user

idid user_id user_name address city zip email password sex type

Figure 2 user table on database

sports
sports_id Sport_name

Figure 3 sports table on database

12
Web application for KSport sports clubIndividual

booking

book_id Sport_name booked_by booking_dat date_of_bookin payment_status tickets


e g

sports users

Figure 4 booking table on database

There's no top-to-bottom ordering to the rows, theres no left-to-right ordering to the columns,
there are no duplicate rows, every row-and-column intersection contains exactly one value from
the applicable domain therefore it is in 1st Normal Form

Step 02 No weak entity


It is in first normal form; all non-key attributes are fully functional dependent on the primary key
therefore it is in 2nd Normal Form.

Step 03 One to one mapping


A table is in 2nd Normal Form and it contains only columns that are non-transitively dependent
on the primary key, therefore it is in 3rd Normal Form

13
Web application for KSport sports clubIndividual

Task 04
Standard Coding Methodologies

Structured Coding: Code indentations are given properly to make easy reading and
understandable manner debug in case of any error occurred

Figure 5 Coding with proper indentation

Appropriate Names: suitable names are given for each html and PHP pages to make user to
navigate easily and understand the purpose of web pages. Moreover, all functions and variables
are given by suitable names that can be easy to memorize while referring them.

Figure 6 Proper Names for Admin Pages

14
Web application for KSport sports clubIndividual

Figure 7 Proper Names for Webpages

Figure 8 Proper Names for functions

15
Web application for KSport sports clubIndividual

Figure 9 Suitable Names for Variables

Comments: Suitable comments are given beside each coding to understand the purpose of that
piece of code, it will be easy to update later on and make comfortable to debug the errors

Figure 10 Sutable Comments in specific places

Specific Features of the language

Functions: functions used to reuse the piece of code again and again whenever it requires, this
feature will make less coding and helps to organize the code structure in very easy manner,

16
Web application for KSport sports clubIndividual

Figure 11 Using functions to reuse the code

Arrays: Arrays were used to store multiline data such as fetching database tables to a PHP
variables

Figure 12 Using arrays to fetch database

Loops: Loops are useful while fetching multiple lines of data to an array

Figure 13 Using Loops to fetch multiple lines of data

17
Web application for KSport sports clubIndividual

Task 06

18
Test Test case Test data Expected Result Actual Result
case
no application for KSport sports clubIndividual
Web
01 Register Userid Nirzaf successfully successfully
Password 1234 registered Alert registered Alert
Confirm password 1234 message should Message
Name: Fazrin display displayed
Address 412,
bulugohotenne
City kandy
Post code 20850
Email email@web.com
Sex male
02 Register Giving an Email address This email This email
which is already registered address is already address is already
in the database registered registered
email@web.com message should Message
display displayed
03 Login Email address - Direct to member Directed to
email@web.com index page member index
Password 1234 page
04 Login Email address - Incorrect Incorrect
geeth@gmail.com password message password
Password 123456 should display message
displayed
05 Admin login Email address Direct to admin Directed to admin
admin@gmail.com index page index page
Password admin123
06 Check Game Tennis Sorry this date is Sorry this date is
Available Date 30-08-2017 already booked by already booked by
game another user another user
message should message
display displayed
07 Check Game Tennis Available Available
Available Date 31-08-2017 Message should Message
game display displayed
08 Booking Selected game Tennis Please login Please login
(before login) Date 31-07-2017 before booking before booking
Message should Message
display displayed
09 Booking (after Selected game Tennis Booked Booked
logged in) Date 31-07-2017 Successfully Successfully
Message should Message
display displayed
10 Search Input the search key word Should display Result displayed
member xxxx results about according to
details member details search key word
related to
keyword
11 Search Input the search key word
19 Should display Result displayed
booking xxxx results about according to
details booking details search key word
related to
Web application for KSport sports clubIndividual

Conclusion
This web application is all about the solutions for KSport Sports club issues facing due to not
using a proper web application system. After implement this web application to the KSport, it
will have the following benefits.

Improve the communication between KSport members and the club, new visitors also able
know the facilities of the KSport Sports club and possible make to request to become a
member, this will increase the profit of KSport.

Booking will be easy without going to the KSport physical location members are able
reserve tickets for any sports on any dates which available

Admin operations made easy to control the member details and booking details, Sport
details are also easy to manage as per future requirements

Club news updates will create motivation among members to be part of the club events

Availability checking feature is useful to check the available sports on expected dates even
for new visitors of website

Future recommendations for this web application

Implement more facilities to members through website such contact the KSport staffs
through live chatting or contact us feature.

Implement online payment gateway so members are able pay through credit cards or
debit cards while booking their tickets

Adding multiple admin so admin can add more admin accounts

Special database table for log report so admin can track the frequency of the logins of
each member

Forget password option to change the member password using their email account

References

20
Web application for KSport sports clubIndividual

OZZU Web Master Forum , 2017. OZZU. [Online]


Available at: http://www.ozzu.com/programming-forum/brief-comparison-server-side-scripting-
langauges-t90248.html
[Accessed 27 04 2017].

PHP, 2017. What is PHP. [Online]


Available at: http://php.net/manual/en/intro-whatis.php

Rouse, M., 2017. Web server. [Online]


Available at: http://whatis.techtarget.com/definition/Web-server

Ruby , 2017. Ruby. [Online]


Available at: https://www.ruby-lang.org/en/

W3Schools.com, 2017. ASP and ASP.NET Tutorials. [Online]


Available at: https://www.w3schools.com/asp/

21
Web application for KSport sports clubIndividual

Appendix 01

Gantt Chart
Panned Schedule to be complete this project is given below

Figure 14 Epected Gantt Chart

22
Web application for KSport sports clubIndividual

Actual schedule to be complete this project is given below

Figure 15 Actual Gantt Chart

Some task took more than expected time to complete them therefore some changes occurred
between panned schedule and actual schedule, date of demonstration for the website will be
decided by the assessor so it could not be added to the gantt chart.

23
Web application for KSport sports clubIndividual

Appendix 02
Test Case Outputs (Screen Shots)
Test Case 01

Figure 16 Registration data stored to database successfully

Test Case 02

Figure 17 Email Id already registered

24
Web application for KSport sports clubIndividual

Test Case 03

Figure 18 Member Index Page after login

Test Case 04

Figure 19 Invalid username or Password

25
Web application for KSport sports clubIndividual

Test Case 05

Figure 20 Admin Manage page after admin login

Test Case 06

Figure 21 Selected date already booked

26
Web application for KSport sports clubIndividual

Test Case 07

Figure 22 Selected game Available

Test Case 08

Figure 23 Please Login before booking

27
Web application for KSport sports clubIndividual

Test Case 09

Figure 24 Selected Sport Booked Successfully

Test Case 10

Figure 25 Search Member details

28
Web application for KSport sports clubIndividual

Teste Case 11

Figure 26 Search Booking details

Test Case 12

Figure 27 Update Member details

29
Web application for KSport sports clubIndividual

Test Case 13

Figure 28 Member details deleted succeefully

Test Case 14

Figure 29 Booking details updated

30
Web application for KSport sports clubIndividual

Test Case 15

Figure 30 Booking details deleted successfully

Test Case 16

Figure 31 New Sport added

31
Web application for KSport sports clubIndividual

Test Case 17

Figure 32 Sport deleted

Test Case 18

Figure 33 Sport Updated

32
Web application for KSport sports clubIndividual

Appendix 03
User feedback reports from various users
Web Application Evaluation Form - 01
User Name: Damminthan Luxmekanthan
Profession: Student
Age (optional): 20

Please answer the following questions by Y for yes & N for no

WISDOM ENQUIRY SYSTEM


Criterion Y/N
Is the level of language that the program offers clearly indicated? Y
Is it easy to navigate the website pages? Y
Is the user interface easy to understand? Y
Is it easy to understand the purpose of each page? Y
Are menus that are used to assist navigation (e.g. back to the Y
homepage, logout) clear and intelligible?
Is it always clear to the learner which point s/he has reached in Y
the web application?
Does the program branch to remedial routines? Y
Are the grammar and vocab used in the program accurate? Y
At any time were you unsure how to proceed to next step? N

Please give your rating for following questions out of 5

Questions Rating
How user-friendly is our website interface? 5
How successful is our application in performing its intended 5
task?
How likely are you to recommend our website to others? 5
Comfortable of using the website 5
How much this system is secured 5
How much easier to learn this website by beginner 5
Application Accuracy and free of bugs 5
Overall satisfaction 5

Any Other Comments or Feedback

Nothing to say Superb one.

33
Web application for KSport sports clubIndividual

Web Application Evaluation Form - 02


User Name: Dinuka Karunarathne
Profession: Student
Age (optional): 21

Please answer the following questions by Y for yes & N for no

WISDOM ENQUIRY SYSTEM


Criterion Y/N
Is the level of language that the program offers clearly indicated? Y
Is it easy to navigate the website pages? Y
Is the user interface easy to understand? Y
Is it easy to understand the purpose of each page? Y
Are menus that are used to assist navigation (e.g. back to the Y
homepage, logout) clear and intelligible?
Is it always clear to the learner which point s/he has reached in Y
the web application?
Does the program branch to remedial routines? Y
Are the grammar and vocab used in the program accurate? Y
At any time were you unsure how to proceed to next step? N

Please give your rating for following questions out of 5

Questions Rating
How user-friendly is our website interface? 5
How successful is our application in performing its intended 5
task?
How likely are you to recommend our website to others? 4
Comfortable of using the website 4
How much this system is secured 5
How much easier to learn this website by beginner 3.5
Application Accuracy and free of bugs 4
Overall satisfaction 4

Any Other Comments or Feedback

It is a very cool software to use for book shop management, yet it can be
improved more by adding some more features, keep it up your good work

34
Web application for KSport sports clubIndividual

Web Application Evaluation Form - 03


User Name: Shazna Gaffoor
Profession: Student
Age (optional): 20

Please answer the following questions by Y for yes & N for no

WISDOM ENQUIRY SYSTEM


Criterion Y/N
Is the level of language that the program offers clearly indicated? Y
Is it easy to navigate the website pages? Y
Is the user interface easy to understand? Y
Is it easy to understand the purpose of each page? Y
Are menus that are used to assist navigation (e.g. back to the Y
homepage, logout) clear and intelligible?
Is it always clear to the learner which point s/he has reached in Y
the web application?
Does the program branch to remedial routines? Y
Are the grammar and vocab used in the program accurate? Y
At any time were you unsure how to proceed to next step? N

Please give your rating for following questions out of 5

Questions Rating
How user-friendly is our website interface? 5
How successful is our application in performing its intended 5
task?
How likely are you to recommend our website to others? 5
Comfortable of using the website 5
How much this system is secured 5
How much easier to learn this website by beginner 5
Application Accuracy and free of bugs 5
Overall satisfaction 5

Any Other Comments or Feedback

Highly satisfied with this program due to its user-friendliness and advanced
options provided.

35
Web application for KSport sports clubIndividual

Web Application Evaluation Form - 04


User Name: Lahiru Nilanjana Karunarathne
Profession: Student
Age (optional): 19 years

Please answer the following questions by Y for yes & N for no

WISDOM ENQUIRY SYSTEM


Criterion Y/N
Is the level of language that the program offers clearly indicated? Y
Is it easy to navigate the website pages? Y
Is the user interface easy to understand? Y
Is it easy to understand the purpose of each page? Y
Are menus that are used to assist navigation (e.g. back to the Y
homepage, logout) clear and intelligible?
Is it always clear to the learner which point s/he has reached in Y
the web application?
Does the program branch to remedial routines? Y
Are the grammar and vocab used in the program accurate? Y
At any time were you unsure how to proceed to next step? N

Please give your rating for following questions out of 5

Questions Rating
How user-friendly is our website interface? 5
How successful is our application in performing its intended 5
task?
How likely are you to recommend our website to others? 5
Comfortable of using the website 5
How much this system is secured 4
How much easier to learn this website by beginner 5
Application Accuracy and free of bugs 5
Overall satisfaction 5

Any Other Comments or Feedback

Very user friendly and easy to use. Available of many customizations where
the user can comfortably adjust according to his/her needs. Functions work
accurately and efficiently. A very good and stable system.

36

You might also like