Question: 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!


Khead>
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>
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
