PHP Taskbook Level 5.3

Задание 1

A form with an input is given. A number is entered into the input. After sending the form, if an odd number is entered, then paint the input border red, and if an even number, then green.

Задание 2

Given a form with an input. A number is entered into the input. After sending the form, display the factorial of the entered number on the screen.

Задание 3

Given a form with a button and two inputs. Integer numbers are entered into the inputs. After submitting the form, determine which of the entered numbers is greater and display it on the screen.

Задание 4

A form with a button and an input is given. A number is entered into the input. After sending the form, find the sum of the digits of the entered number.

Задание 5

A form with a button and an input is given. A word is entered into the input. After sending the form, turn the word over and write it in a paragraph.

Задание 6

The following data structure is given:

php<?php
  $data = [1, 2, 3, 4, 5];
?>

Using this data, create the following layout:

html<input value="1">
<input value="2">
<input value="3">
<input value="4">
<input value="5">