1. You are expected to keep your code clean and simple, similar to the code from MurachOthers

A2 Part 1: Simple web site using PHP

====================================

General requirements

  1. You are expected to keep your code clean and simple, similar to the code from Murach
  1. Part 1 of A2 is a standalone web application called "a2part1".

This should be the name of a folder in your Apache htdocs.

  1. Any reference to files in the PHP or html pages should be relative to the web application root

Any reference to a file, which is specified by absolute path will lower your mark.

Example: a reference of the form C:3020A3myCss.css

is absolute and is not acceptable.

  1. Do not use graphics (graphical images).

The total size of the A2 files sent to the TA cannot be larger than 500 Kilo Bytes.

  1. Files in a2part1 folder:
    • html : see 2. below
    • php : see 3. below
    • css : css file

Attention: do not use any external JavaScript files. Chances are you will not be allowed by the mail delivery system (google) to submit your assignment google flags .js files as potential viruses.If you need to use JavaScript, you can embed it in the .html and/or.php files. 

  1. High level description

-------------------------

This is a PHP web application, which permits the user:

  • to enter a float (real) number and
  • to have a transformation applied on

Here transformation means:

T1. Standardize user number's decimal part length

T2. Reverse the digits of the given user number after standardization.

  1. Get a number from user (index.html)

--------------------------------------

This page is written in XHTML.

On top, the page displays:

"Input a number. It will be standardized and reversed."

The page has one XHTML form, which has :

  1. One text input field, allowing the user to enter a float/real number, expected to be in the format: 9999

We will call this number: User Number (UN).

  1. The text input is preceded (on the left) by a static text, explaining the expected

For example: "Enter a number (format : 999999.9999) : ".

  1. One drop-down control, which allows the user to select one of following options: 1, 2, or

These options will be user's choice regarding the decimal part length in the transformed UN.

We will call this field: ND_DP.

  1. The drop-down control is preceded (on the left) by a static text, explaining its

For example: "Standardized number of digits in the decimal part : ".

  1. One submit button, whose name is SubmitNumber

Requirements :

  • the form is submitted to TransformNumber.php when the user presses the submit button ;
  • the submission method can be either get or post
  1. Transform number page (TransformNumber.php)

----------------------------------------------

This page is written in PHP.

  1. The page retrieves:
  1. the user input from index.html's text input field (UN)
  2. the user input from index.html's drop-down control (ND_DP)
  3. b) the name of the button pressed in index.html
  1. The page validates that:
  1. the index.html form was submitted by pressing the button SubmitNumber
  2. the string entered in the form:
    • is not empty,
    • is numeric and
    • has at most 3 digits after the decimal sign

Attachments:

Instructions Files

Others Experts

expert
Emma Zohn
Others

77 Answers

expert
Eden James
Others

91 Answers

View More Experts
Disclaimer

The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.

Get Free Quote!

268 Experts Online