Question: You are requested to provide the following using MySQL, PHP, HTML and CSS with the techniques taught in class. 1. Create a database (csc385_project) with

You are requested to provide the following using MySQL, PHP, HTML and CSS with the techniques taught in class.

1. Create a database (csc385_project) with a username (csc385admin) and password (csc385pass)

2. Create a table (teams) that includes information about the teams participating in the FIFA 2022 world cup. Information includes

id (a unique value identifying the team, usually auto-incrementable)

name of the team (string)

logo a string of the image name e.g. brazil.jpg and not the full path to the image in the file system

world rank (integer)

3. Create a table (team_players) that includes information about the players in each team including the below:

id (a unique value identifying the player, usually auto-incrementable)

team_id (the foreign key relating this player to the team they belong to)

name (name of the player)

photo: a string of the image name e.g. neymar.jpg and not the full path to the image in the file system

4. Create a table (contacts) that will hold information about contact requests submitted from the website. Information includes

name (the name of the person contacting you)

email (the email of the person contacting you)

phone (phone number of the person contacting you)

purpose (an enumeration of possible choices including feedback, support, question, problem, general)

comments (text)

5. Create a script (index.php) that shows the following:

a header part showing some nice design that you can be creative with

list of teams: for each team show the name and logo. Each team will be displayed in a card that is 200x200 px. Team cards should be floating near each other depending on the screen size.

A contact us form that the user can fill to contact the website owner. The fields include the following:

name (text field)

email (email field)

phone (text field)

purpose (drop down showing the options in the enumdb field above)

comments (text area)

When a team logo or name is clicked, a script (teamdetails.php) should be executed with the ID of the team in its URL (using GET) and should show the team details. This includes:

o team name

o team logo

o team world rank

o list of players in the team (name and image). Each player card should be 200x200 px floating near each other.

When the contact form is filled and submitted, a script called savecontact.php should be executed passing the filled data using POST. The script should validate the data and store the information in the database table (contacts). By validation, I mean checking that all data is present and in the right format. If any data is missing, a message should be displayed information the user what is missing and saving the information should not continue. The user can then go back, fix the data and submit it again.

Instructions

All team logos should reside in a folder called /assets/teams/logos/

All player photos shoudl reside in a folder called /assets/teams/players/

When displaying the data, your application should automatically calculate the URL to use from the above URLs and the name of the image / logo stored in the DBMS. Example: if the player photo name is neymar.jpg, then the URL should be calculated as /assets/teams/players/neymar.jpg. Yet, the database table should only include neymar.jpg as mentioned above.

The database should include at least information about 4 teams of your choice.

Terms & Conditions

All code written in the assignment should be done using the techniques taught in class.

All CSS should be stored in a file called /assets/style.css

All HTML should be valid HTML and well structured

All PHP code should be split into objects within a folder called 'lib' with an autoload script that automatically loads classes from the lib folder depending on the namespace and class name.

The minimum classes that I need are:

Core\Database (this class handles database connections)

Core\Config (this class holds all data related to configuration such as DB username, DB password, etc.)

Fifa\Teams (this class handles all functionality related to teams)

Fifa\Players (this class handles all functionality related to players)

Core\Contact (this class handles all functionality related to the contact form saving)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!