algorithm.fprg input.html Calculate Cost of Tickets There is a ticket fee of $0.50/ticket fo



Don't use plagiarized sources. Get Your Custom Essay on
algorithm.fprg input.html Calculate Cost of Tickets There is a ticket fee of $0.50/ticket fo
Just from $10/Page
Order Essay


Calculate Cost of Tickets

There is a ticket fee of $0.50/ticket for orders with over 5 tickets.
Otherwise the fee is $1.00/ticket.

User Information

Phone Number:

Format: 123-454-5678

Concert Location Desired
Choose a Location
Austin, Tx

Tickets Needed
How many adult Tickets?

How many child Tickets?

What Date Do You Want
Apr 2022

May 2022

Jun 2022

Send Your Order

The Band is looking forward to seeing you!


body {
background-color: #eee; /*gray is eeeeee but since all the same can shorten to eee*/
font-family: “comic sans ms”, cursive, sans-serif;


header {
padding:5px; /*padding is 4 sides but if all the same can use one. 20px 20px 20px padding top, padding right, padding bottom, padding left*/

ul {
nav ul {

nav {
float:left; /*The float CSS property places an element on the left or right side of its container, allowing text and inline elements to wrap around it. The element is removed from the normal flow of the page, though still remaining a part of the flow */

.container {
background-color: white;
margin: 0 auto; /*0 is for top-bottom and auto for left-right. It means that left and right margin will take auto margin according to the width of the element and the width of the container. Centers container*/


main {
padding: 10px;

a {

.white {color:white;

img {
border:2px solid #4f33ff;

h2 {color:darkblue;}

.about {padding:0 10px 0 0;}

footer {
padding: 10px;
/*color: white;*/
text-align: center;

table,th, td {
border: 2px solid black;

table {

thead {
tbody {color:blue;}

tfoot {

caption {font-family:cursive;
border: 2px solid darkblue;
legend {
color: white;
padding: 5px 5px;
/*.alignment label {
display: block;
margin-bottom: .2rem;

button {

[Document title]

Lesson 12

Lab 12 – Pulling HTML, CSS, and a Backend language together


1. Convert the flowgorithm algorithm design into a Web Application using:

· Backend programming language PHP for processing

· HTML for Linkage and Information

· HTML forms for input

· Style Sheets for consistency

2. Perform development and testing within a local web application development environment (XAMPP)

3. Complete the software development cycle.

Lab overview

· What we have done so far:

· Designed an algorithm using Flowgorithm for “Concerts”

· Created a web form page for the user interface using HTML and CSS.

· Installed XAMPP and set up the local web application development environment.

· We have learned just enough PHP in this lesson for this lab

· Now let’s combine all the technologies together to complete the “Concerts” web application.

· You will submit 3 files for this lab.

Web Form:

PHP Back-end Program:

Style Sheet:

Lab Task Checklist

It is expected you have read the required reading in this Lesson before starting the lab.

2. Review the customer requirements:

Customer Requirements: The customer needs an application that provides the total cost of concert tickets to include sales tax. The customer will provide their name, phone number, and how many adult and child tickets they want. The program will do the required calculation and display the name, phone number, #number of tickets, sales tax total, subtotal, and total cost.

· Adult tickets are $36.75/each and child tickets are $25.50/each.

· Sales tax is 7% (0.07 for calculations purposes). Total = subtotal + total tax + fee

· It needs to display the transaction with a title of the Concert (This is provided by the program)

· Validate the Input before processing

· The only dates that are available for attendance are: Mar, Apr, and May.

· There must be at least one adult ticket purchased before any processing is done.

· There is an additional fee to add to total cost.

· Each transaction adds a fee charge based on how many tickets. If they have 5 or the less the fee is $1 (1.00) per person and if more than 5 it is reduced to 50 cents (.50) per person. The fee is not taxed but is part of the total cost.

· Fee has been added to the display requirements

· Allow user to continue with another transaction or exit the program

3. Review (attached in Blackboard as




4. Modify/Rename the attached using the required naming conventions and to meet the
Lab Instructions.

5. Review the attached
structure.pdf. You will use this
to create your backend program (php) within your text editor. Make sure you save in the correct xampp location (/htdocs) so you can run and test the code. See
Lab Instructions.

6. Use XAMPP and the URL address to test your web application

Validate all .html and .css files. .php does not require validation.

8. Zip all the files to be uploaded in one package. Make sure you have included images if needed.

9. Submit all files/s (zip) to Blackboard

Lab instructions – creating a web application

1. Open your text editor/Notepad++ and immediately save the html and css files you downloaded with the required naming conventions.

· Save the renamed files to x:xampphtdocscti110coursework folder. Your path may differ BUT in needs to be in your xampphtdocs folder for localhost to work and to test with the backend program.

· You will need to modify the files to ensure correct linkage (Relative Addressing should be used…assumption all files in same location/folder)

i. Link the css file for both the form and .php files

ii. Link from form to php code program

iii. Link back to form once transaction complete

2. Translate the

to actual php code using your text editor. See how this code differs and is similar to the Flowgorithm algorithm (source code view…php). You should understand why the code differs (This will help in your group project).

3. Modify your .html form to meet linkage and lastname requirements. This file should call the
PHP Back-end Program in the form action attribute.

4. Make sure backend program (.php) links back to the form

5. What the attached pdf structure does:

· Creates a PHP Program to process the information from the form web page to calculate and output the concert costs to meet user requirements. Retrieves all input data from the web form file using $_POST

· Declares Named Constants for:

· TAX, 0.07

· ADULT_COST, 36.75

· CHILD_COST, 25.50

· MIN_FEE, 0.50

· MAX_FEE, 1.00


· Calculates the cost of tickets

· Outputs the requirement information in HTML format

· Displays all order summary information as shown in
Render: Example PHP Report Results below.

· Money data is be formatted for 2 decimals

· The Return to Form Entry should allow them to complete the form again.

**note we are not using the landing page created in Lesson 1 – 4 but realize that a full web application would also include the web landing page but it is not needed for this lab (it will be needed for the group project)

6. What the Cascade Style Does (realize there is both internal and external used):

· The styling should be consistent

· You may adjust the styling to reflect your uniqueness

· Understand that sometimes you may need a mix of internal and external CSS

additional Lab instructions

Test Cases:

1. T1: adults 2 , child 2. Subtotal = 124.50. Tax = 8.72 , fee = 4,total cost = 137.215 Test 5 or less

2. T2: adults 3, child 2. Subtotal = 150.00, Tax=10.15, fee = 5 for Total Cost = 165. Attending=5

3. T5: adults 3 child 3. subtotal=186.75, tax = 13.0725, fee= 3 Total cost = 202.8225

Example Renders of completed lab:

Render: lastname-input.html

Render: Example PHP Report Results (after executing your php program)

Reviewing the algorithm

HTML Linkage

Input and Validation Done by the HTML Form Page

PHP Calculates and Outputs Concert Details

Code Render: see attached in blackboard








<!DOCTYPE html>
<html lang=”en”>

<!–Name: Your name
Blackboard User Name: XXXX
Class Section: CTI.110.XXXX
<meta charset=”utf-8″ />
<title>L11 Event Form </title>
<link href=”lastname-lab11b-style.css” type=”text/css” rel=”stylesheet” />
li {border: 3px solid #666cff; padding: 10px; margin-right:30px}
<div class=”container”>

#Any variables used on the RIGHT side of an assignment statement must be
populated before use!
#In PHP the LEFT side can be defined at the same time used. NOT all
languages allow this!

//Use the $_POST superglobal to recieve information from the HTML form
//The $_POST MUST match the name=xxx in the form input type.
$name = $_POST[‘name’];
$phone = $_POST[‘phone’];
$adultTickets = $_POST[‘adultTickets’];
$childTickets = $_POST[‘childTickets’];
$date = $_POST[‘date’];
$location = $_POST[‘location’];

//Name of constants must follow the same rules as variable names, which means
a valid constant name must starts with a letter or underscore, followed by
any number of letters, numbers or underscores with one exception: the $
prefix is not required for constant names. By convention, constant names are
usually written in uppercase letters separated by underscores. This is for
their easy identification and differentiation from variables in the source

#Declare and define named constants

define (“TAX”, 0.07);
define (“ADULT_COST”, 36.75);
define (“CHILD_COST”, 25.50);
define (“MIN_FEE”, 0.50);
define (“MAX_FEE”, 1.00);
define (“ATTEND”, 5);

#Calculations for concert costs
$totalTickets = $adultTickets + $childTickets;

if ($totalTickets <= ATTEND)
$fee = ($totalTickets * MAX_FEE);
$fee = ($totalTickets * MIN_FEE);

$subtotal = ($adultTickets * ADULT_COST) + ($childTickets * CHILD_COST);
$salesTax = ($subtotal * TAX);
$totalCost = $subtotal + $salesTax + $fee;

//Print is also considered to be a function while echo is a language
construct. You can use html tags in the print and echo statements.
#Displays Final Report

print (“<header><h1>Summary Ticket Cost for Concert</h1></header>”);

print (“<p>Thank you <b>”.$name.”</b> at <b>”.$phone. “</b>.
Details of your total cost <b>$” .number_format($totalCost, 2).
“</b> are shown below:</p>”);
print(“<ul><li>Adult Tickets: $adultTickets </li>”);
print(“<li>Child Tickets:” .$childTickets.”</li>”);
print(“<li>Date: ” .$date.”</li>”);
print(“<li>Location: ” .$location.”</li>”);
echo(“<li>Sub-total: $”.number_format($subtotal, 2).”</li>”);
print(“<li>Sales tax: $”.number_format($salesTax, 2).”</li>”);
print(“<li>Fee: $”.number_format($fee, 2).”</li></ul>”);
echo(“<ul><li><b>TOTAL:</b><b> $”.number_format($totalCost, 2).”

#Prints Finish
print (“<h3>Thank you for using this program – Programmer is:
print (‘<br><footer><a class=”white” href=”instructor-lab11b-form.html”>
Return to Form Entry To Continue</a></footer>’);

</div> <!–closes container–>

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
The price is based on these factors:
Academic level
Number of pages
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 30% with the discount code ESSAYSHELP