Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi there! Can someone help me fix my php code? My code doesn't seem to work and was wondering if someone could point out what

Hi there! Can someone help me fix my php code? My code doesn't seem to work and was wondering if someone could point out what I did wrong and explain them. The code is attached below together with the commented requirements. Thanks so much!

image text in transcribed

image text in transcribed

Khead> Temperature Converter <meta charset-> 5 Ebody> ?php Svalue POST I"value"] $type = $_POST ["type"]; 10 //check if value is a number. If not, notify the user of the error and stop the script if(is numeria ($value) 12 13 1 4 15 16 17 18 19 20 21 return Svalue else echo 'The value entered is not a number Try again.' exit('Unable to convert. Goodbye") /*create a function that conve rts to and from adRAHor Fahrenheit depending on selected option (shown as draRdaMa menu) The function should take two parameters: the temperature to be converted, and the unit the temperature is to be converted to. Once complete, the function should return the converted temperature Finally, display the original temperature and the converted temperature to the user./ function convert (Svalue, Stype) [ 23 2 4 25 2 6 27 28 2 9 30 31 32 $result ($value"(9/5) + 32); = } else if ($type == "calaiua"){ $result = (($value 32) (9/5)); * - return Sresult; if (isset ($ POST ['btnConvert')) $value $_POST ["value"]; $typePOST"type" $result= convert ($value, $type);! echo "The entered temperature was $value. The converted temperature is result." 3 4 35 3 6 37 3 8 3 9 40 41 42 43 2>
45 4 6 47

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions

Question

What are the five basic components of a PLC?

Answered: 1 week ago

Question

Identify factors that foster trusting relationships with others.

Answered: 1 week ago