Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a web page for the GGC PHP Club. This page will collect users information such as name, email, gender, and/or other information you would

Create a web page for the GGC PHP Club. This page will collect users information such as name, email, gender, and/or other information you would like to collect. This page will give users 5 questions to test userss PHP level. Please find or make appropriate PHP questions. Each question is 20 points. If a users score is less than 60, its the beginners level. If the score is between 60 and 79, its the experienced programmers level. If the score is 80 or above, its the gurus level. After the user submits, show the users basic information, test score, and level on another page. Please decorate the pages as you like.

Create a web page to show the statistics of the PHP test. Record the users answers to the demographic questions such as name, email, gender, major, etc, and the answers to 5 PHP questions in a text file. You web page will show the avearge score of all the users, the average scores of the male/female users, and average scores of users from each major. Also use meters to compare the number of beginners/programmers/gurus in each major(Digital media, software development, security, business). At the bottom of the page, show all the submitted information of all the users.

Make a table, for each question, show the percentage of users selecting each option. Mark the correct answers with a different color.

This is what i have so far. i have the first part done. except for calculating the scores.

Project 2 Correct! ";

function format_input($input) //YOU NEED TO HAVE THIS FUNCTION FOR SECURITY CONCERNS!!!!!!!!!!!!!!!!! { $input = trim($input); $input = htmlspecialchars($input); return $input; }

if(isset($_POST['submit'])) //This is how to say that if the name has nothing in it, a display message will say Name is required. If it is inputed, then follow the format_input { if(empty($_POST['name'])) $nameError = "Name is required!"; else $name = format_input($_POST['name']); if(empty($_POST['email'])) $emailError = "Email is required!"; else { $email = format_input($_POST['email']); //also need to check if in email format if(!filter_var($email, FILTER_VALIDATE_EMAIL)) //if email is NOT (!) in the filtered variable of email format then display message $emailError = "Email is incorrect, please try again!"; } if($_POST['major']) $major = format_input($_POST['major']); if($_POST['Q1']) $Q1 = format_input($_POST['Q1']); if($_POST['Q2']) $Q2 = format_input($_POST['Q2']); if($_POST['Q3']) $Q3 = format_input($_POST['Q3']); if($_POST['Q4']) $Q4 = format_input($_POST['Q4']); if($_POST['Q5']) $Q4 = format_input($_POST['Q5']); if($_POST['showanswer']) $showanswer = format_input($_POST['showanswer']); } ?>

PHP Quiz


Name: *

E-mail: *
Choose your major area of study:

1) What does PHP stand for? (20 points)

A. Processor Handling Program B. Program Hypertext Preprocessor C. PHP: Hypertext Preprocessor


2) What input type is for entering text? (20 points)

A. radio
B. email
C. text
D. comments

3) Which extension is a correct PHP file extension? (20 points)

A. .php
B. .cpp
C. .html
D. .pxp

4) True or False: PHP is expensive (20 points)

A. True
B. False


5) What is the symbol to declare a function (20 points)

A. %
B. $
C. *
D. #


Show correct answers after submission.


"; echo "Name: ".$name."
"; echo "Email: ".$email."
"; echo "Major: ".$major."
";

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions

Question

2. (1 point) Given AABC, tan A b b

Answered: 1 week ago