View Single Post
  #1 (permalink)  
Old June 9th, 2012, 01:27 PM
MRGLENN MRGLENN is offline
Registered User
Points: 43, Level: 1
Points: 43, Level: 1 Points: 43, Level: 1 Points: 43, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2012
Posts: 7
Thanks: 1
Thanked 1 Time in 1 Post
Default 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.... )
Reply With Quote