Practice on Forms in PHP

Задание 1

Write a script that converts temperature from degrees Celsius to degrees Fahrenheit. To do this, create an input and a button.

Задание 2

Write a script that calculates the factorial of a number. The number itself is entered into an input, and after pressing a button, the user should see the result.

Задание 3

Given an input and a button. A number is entered into the input. Upon clicking the button, display a list of divisors of this number.

Задание 4

Given 2 inputs and a button. Numbers are entered into the inputs. Upon clicking the button, display a list of common divisors of these two numbers.

Задание 5

Write a script that finds the roots of a quadratic equation. To do this, create 3 inputs for entering the coefficients of the equation.

Задание 6

Given 3 inputs. Numbers are entered into them. Check if these numbers form a Pythagorean triple: the square of the largest number must be equal to the sum of the squares of the other two.

Задание 7

Given an input and a button. A birth date is entered into this input in the format '01.12.1990'. Upon clicking the button, display how many days are left until the user's birthday.

Задание 8

Given a textarea and a button. Text is entered into the textarea. Upon clicking the button, display the number of words and the number of characters in the text.

Задание 9

Given a textarea and a button. Text is entered into the textarea. Upon clicking the button, calculate the percentage of each character in the text.

Задание 10

Given 3 selects and a button. The first select is for days from 1 to 31, the second select is for months from January to December, and the third is for years from 1990 to 2025. Using these selects, a date can be chosen. Upon clicking the button, display the day of the week corresponding to this date.

Задание 11

Create a horoscope script. Inside it, store an array of horoscopes for several days ahead for each zodiac sign. When the page loads, ask the user for their birth date, determine their zodiac sign, and display the prediction for this zodiac sign for the current day.