Question
write PHP l CODE You will need to convert this table into a numerically indexed array of associative arrays, the beginning of which should look
write PHP l CODE
You will need to convert this table into a numerically indexed array of associative arrays, the beginning of which should look like this. Each associative array holds the data for a particular student.
$students = array( array('name' => 'Rex Solertan', 'hrs_attempted' => 23, 'gpa_points' => 28, 'major' => 'CIT'), array('name' => 'Rivka Alexander', 'hrs_attempted' => 41, 'gpa_points' => 103, 'major' => 'EET'), ... and so on for 9 more students.. }
There should be 11 students total. Here they be.
name | hrs_attempted | gpa_points | major |
---|---|---|---|
Rex Solertan | 23 | 28 | CIT |
Rivka Alexander | 41 | 103 | EET |
Ned Ramos | 28 | 52 | BUS |
Zoe Martinez | 30 | 93 | WEB |
Carl McElan | 54 | 100 | WEB |
Bob Palla | 21 | 36 | CIT |
Tilda Downey | 31 | 86 | CIT |
Mary Proth | 33 | 105 | CIT |
Zelda Rowe | 12 | 39 | BUS |
Sue Mar | 20 | 50 | BUS |
Max Stone | 42 | 80 | EET |
This project requires a regular HTML file with a HTML form that posts to a separate php file. For 4A the first page, the HTML file, should look like this with a select list and a button.
The select list should display student majors using these 4 options: Business, Computer Info Technology, Elect. Engineering Tech., and Web Site Design. Since the array of student data has the major indicated as BUS, CIT, EET, and WEB, these values should be the option values of your select list. Something like this.
The user should select a major and click the button. When the button is clicked you post to a second page, a php page, that takes the array of of student data and displays it in a HTML table that has each student's name, their calculated GPA, and their major. gpa is calculated as gpa_points / hrs_attempted.
For example, if the user selects Computer Info. Technology from the select list and clicks the submit button, your php page should filter the array of students for CIT majors, calculate the gpa by dividing pga_points by hrs_attempted by, and put the 3 pieces of info into a html table. The page might look like this.
Students by Major Select a Major Business SubmitStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started