Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C# and php Project 1 – [20 points] [5 points] Write an HTML document to create a

ID: 3686376 • Letter: C

Question

C# and php

Project 1 – [20 points]

[5 points] Write an HTML document to create a form with the following capabilities:

a. A text box to collect the user’s name

b. Four checkboxes, one each for the following items:

i. Four 25-watt light bulbs for $2.39

ii. Eight 25-watt light bulbs for $4.29

iii. Four 25-watt long-life light bulbs for $3.95

iv. Eight 25-watt long-life light bulbs for $7.49

c. A collection of three radio buttons that are labeled as follows:

i. Visa

ii. Master Card

iii. Discover

[5 points] Write a PHP script that computes the sub total cost of the ordered light bulbs. Add 6.2 percent sales tax. Display the total price.

[5 points] The program should save the order to the text file. (save: name, selections, subtotal, tax, total)

[5 points] The program must inform the buyer of exactly what was ordered. (show your order on the HTML/PHP file)

Project 2 – Work with String – [10 points]

Write a PHP script named states. php that creates a variable $states with the value "Mississippi Alabama Texas Massachusetts Kansas". The script should perform the following tasks:

Search for a word in $states that ends in ”xas”.

Store this word in element 0 of an array named $statesArray.

Search for a word in $states that begins with k and ends in s. Perform a case-insensitive comparison.

Store this word in element 1 of $statesArray.

Search for a word in $states that begins with M and ends in s.

Store this element in element 2 of the array.

Search for a word in $states that ends in a.

Output the array $statesArray to the screen.

Project 3 - [20 points]

Create a PHP page that contains an array of at least 20 movie titles or book titles (your choice). The HTML page should have an input box for the user to enter a username and a title of a favorite movie or a book.

Explanation / Answer

Project 1:

Write an HTML document to create a form to collect user name and check points

HTML forms are used to collect user input.

The <form> element defines an HTML form

<!DOCTYPE html5>
<html>
<body>

<form>
First name:<br>
<input type="text" name="firstname"><br>


<input type="checkbox" name="bulbs" value="$2.39"> 4 bulbs 25 watts<br>
<input type="checkbox" name="vehicle" value="$4.29" checked> 8 bulb 25 watts<br>
<input type="submit" value="Submit">

<p> Visa<br /><label><input type="radio" name="visa" value="visa" checked="checked" </label>

<label><input type="radio" name="Master Card" value="MasterCard" ></label></p>

<label><input type="radio" name="Master Card" value="MasterCard" ></label></p>

<label><input type="radio" name="Discover" value="Discover" ></label></p>

<label><input type="radio" name="Check" value="Check" ></label></p>

<input type="reset" value="reset form">

<input type="submit" value="submit form">

</form>

</body>
</html>