Question: A. Index.php: This document includes db.inc.php (in order to connect to the database), and runs the SQL query to extract the data from the database,

 A. Index.php: This document includes db.inc.php (in order to connect to

A. Index.php: This document includes db.inc.php (in order to connect to the database), and runs the SQL query to extract the data from the database, assign the database results to PHP variables, calculate the contribution and display the results in a table in html.

B. Contribution_function.inc.php. This file will have a function that calculates the employee contribution as: contribution = 2 * $salary/1000 + $month +3 The variable $bdate was sent to the function as a parameter. To get the month, you have to extract it (try using the substr function) from $bdate. Recall that $salary is a PHP variable that is assigned the value of the MySQL attribute salary that you have extracted from the Employee table of the Company database. Recall that you ran that query in the try block. This function should return the contribution to the calling program. You should then be able to display the information by accessing your contribution/index.php file through localhost.

Contribution Application: Goal: Using the Company database, calculate Employee contributions for a company this hello. This is from the includes file in the root directory Here are all the employee contributions for the party party, and display these contribution on a web page. Your output should look like Echo this from the includes file in the root directory. Last Name First Nane Contribution plain Contribution-number format Contribution-formatted S64.00 $95.00 $60.00 $88.00 $124.00 95.00 $56.00 S54.00 64 95 60 S64.00 $95.00 S60.00 $88.00 $124.00 95.00 $56.00 S54.00 Smith Wong EnglishJoyce ohn Franklin Ramesh arayan Borg Wallace Jennifer abbar Zelaya Alicia ames Ahmad 56 54 I am showing the calculation formatted three ways: no formatting; using number format; and using printf. You haven to display only one column, usng some kind of currency formatting Contribution Application: Goal: Using the Company database, calculate Employee contributions for a company this hello. This is from the includes file in the root directory Here are all the employee contributions for the party party, and display these contribution on a web page. Your output should look like Echo this from the includes file in the root directory. Last Name First Nane Contribution plain Contribution-number format Contribution-formatted S64.00 $95.00 $60.00 $88.00 $124.00 95.00 $56.00 S54.00 64 95 60 S64.00 $95.00 S60.00 $88.00 $124.00 95.00 $56.00 S54.00 Smith Wong EnglishJoyce ohn Franklin Ramesh arayan Borg Wallace Jennifer abbar Zelaya Alicia ames Ahmad 56 54 I am showing the calculation formatted three ways: no formatting; using number format; and using printf. You haven to display only one column, usng some kind of currency formatting

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 Databases Questions!