Chapter 11 FORMS - Index Error
Lesson 11 Forms (Error Message )
When Running: Exercise 11a get
Error Message : Undefined index FtoC on line 8
as well as index CtoF on line 13
Code is:
<?php
require_once("exercise11b.php");
$answer = '';
if ($_POST['FtoC'] ) // Line 8
{
$answer = convertFtoC((float) $_POST['temperature']);
}
elseif ($_POST['CtoF']) // Line 13
{
$answer = convertCtoF((float) $_POST['temperature']);
}
?>
------------------------------------------------------
It Calculates Ok but PHP does Not Understand the
['FtoC'] & ['CtoF'] Index's
It Appears something is Missing (Not Initialized)
(Could Not Find any Info in Book about Debugging this Problem.... )
|