CIT-3301-Internet-application-programming.doc
CIT-3301-Internet-application-programming.doc
(2 marks)
c) Loops in PHP are used to execute the same block of code a specified number of times.
Explain four loop types supported by PHP (4 marks)
d) Use an example to write a simple script to illustrate the following PHP in- built
functions (4 marks)
i. String function
e) Write a JavaScript to validate a form by ensuring at least 6 characters are entered into a
text box (6 marks)
i. Action
ii. Method
h) Write a PHP script to assign two values to variables then display the biggest and the
smallest value (4 marks)
b) Write a html tags to create a form with textbox to enter product name, price and
quantity then display total price (4 marks)
i. Write a JavaScript to capture price and quantity values from the form,
calculated total price and return the result to the form result text box
(4 marks)
c) One of the most common uses of event handler is to display a message on the status
line when the user moves a mouse over a link
iii. Write a JavaScript to clear the status line when the user moves the
mouse away from the link (3 marks)