Question: Answer ALL QUESTIONS Question 1 a. Write a code snippet that creates a session and stores a username submitted by a form. [6 marks] b.

 Answer ALL QUESTIONS Question 1 a. Write a code snippet that

Answer ALL QUESTIONS Question 1 a. Write a code snippet that creates a session and stores a username submitted by a form. [6 marks] b. Write a function named longest_word which takes a sentence and returns the longest word in that sentence. [10 marks] Question 2 1. Write a PHP program that will display the following messages related to the person's age: [8 marks] - If the age is between 1 and 18, display the text "Too Young". - If the age is equal to 19,20 display a text "Young". - If the age is greater than 21 and less than 35, display a text "Young Adult". - In all the other cases, display "No information" Question 3 [16 marks] A Radio Button is a way to restrict users to having only one choice. Examples are: Male/Female, Yes/No, or answers to surveys and quizzes Write a script using HTML form elements and PHP codes that will return the value a Radio Button that has a value of "Male" and a second Radio Button has a value of "Female". A code should be added to detect if the user clicked the Submit button. Question 4 Write a PHP program that will create an array sort the name in alphabet order. [10 marks] Input Data for array. Roger Water Nick Mason David Gilmour Teresha Wright [Total 50 marks]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!