0% found this document useful (0 votes)
25 views

Assignment

This document provides instructions for three coding questions: 1) Create an HTML form with specified fields that submits to response.php. 2) Write response.php to reply to the form, validating the IC Number field is numeric or string. 3) Write a while loop in OddNumbers.php that displays all odd numbers from 1 to 100, and open it in a web browser to print the output.

Uploaded by

Hafiz Shukri
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Assignment

This document provides instructions for three coding questions: 1) Create an HTML form with specified fields that submits to response.php. 2) Write response.php to reply to the form, validating the IC Number field is numeric or string. 3) Write a while loop in OddNumbers.php that displays all odd numbers from 1 to 100, and open it in a web browser to print the output.

Uploaded by

Hafiz Shukri
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Question 1a Write a HTML code (using Notepad) to create a form as shown below and it should be sent to response.

php when user submits the form. (13 marks)

Heading 145

picture.jpg

150

Limit to 5 digits

JULY 2011

Question 1b Write a program called response.php to reply the form using the format shown below. You need to add validation code to check whether the data for IC Number is numeric or string. (12 marks) If numeric:

If string:

Question 2 You need to write while statement that displays all odd numbers between 1 and 100 on the screen. 1. Create a new document in your text editor. 2. Type the <html> element, document head, and <body> element. Use Odd Numbers as the content of the <title> element. 3. Create a script section in the document body with while statement that displays all odd numbers between 1 and 100 on the screen. 4. Save the documents as OddNumbers.php in the htdocs folder. 5. Open the OddNumbers.php file in your web browser and print screen the output. (10 marks)

JULY 2011

You might also like