Create an HTML form that accepts the user’s input to enter his/her first name, last name and sex.
E-portal development
Question One
- Create an HTML form that accepts the user’s input to enter his/her first name, last name and sex.
- Create a php file that displays the following sentence:
Hello first name laste name, welcome to IT405.
The sentence should be colored in blue or pink according to the sex..
Your program output should look as shown below
- Include the screenshot of the program output as a part of your answer.
Question Two
- Given the following HTML form code, write a php file that displays all the input of the user as a list.
<!DOCTYPE html>
<html>
<head>
<title>Registration</title>
</head>
<body>
<form method=“get” action=“file.php”>
First Name:<input type=“text” name=“first”><br />
Last Name:<input type=“text” name=“last”><br />
Email:<input type=“text” name=“email”><br />
Level:<input type=“text” name=“level”><br />
<input type=“submit” value=“submit” name=“submit”>
</form>
</body>
</html>
Include the screenshot of the program output as a part of your answer.
Question Three
- Write a PHP program to create a new string where IT’ is added to the front of a given string. If the string already begins with ‘IT’, the program returns the string unchanged.
Sample InputèOutput
“405” è IT405
“403”è IT403
“IT401” èIT401 - Include the screenshot of the program output as a part of your answer.