PHP TEMPERATURE CONVERSION CHALLENGE
This task has been designed to test your ability to use an HTML form and send data to a PHP script.
TASK
Design an HTML form to accept input data from the user.
The user should be able to enter:
● temperature ● select from oC or oF
This data will be sent to a PHP script where you will then convert the temperature from oC to oF or vice-versa.
The formula to convert from oF to oC is:
C = (F - 32) * 5 / 9
The formula to convert from oC to oF is:
F = C * 9 / 5 + 32
HINTS AND TIPS
You will also need to use a conditional statement (IF statement). This will check the user input. IF they select oC then do one conversion ELSE do the other.You may wish to round answers to the nearest degree or 1 decimal place.