PHP script no longer works because of v.4 to v5 migration
<p>Recently my webserver migrated from PHP v.4 to v.5.3.  I know, I know, long time coming :)</p>

<p>But now a number of my scripts do not display results when a user enters the required data.  Here is the script:</p>

<pre><code>&lt;?php 
if ($ok) {

    if ($heightft == "" || $heightin == "" || $weight == "") {
        $error = "&lt;br&gt;&lt;FONT COLOR=#FF0000&gt;One of the fields above was not completed.&lt;/FONT&gt;&lt;br&gt;";
    } else {
        $bmi = $weight * 703 / (($heightft * 12 + $heightin) * ($heightft * 12 + $heightin));
        $bmiString = number_format($bmi,2,".","");
        echo "&lt;table border='1' cellpadding='10' bordercolor='0000FF'&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Your BMI is: " . $bmiString;
echo "&lt;br&gt;&lt;br&gt;&lt;/strong&gt;";

        if ($bmi &lt;= 18.50) { 
            echo "You are classified as &lt;strong&gt;Underweight&lt;/strong&gt;."; 
        } elseif ($bmi &lt;= 24.99) {
            echo "You are classified as &lt;strong&gt;Normal&lt;/strong&gt;."; 
        } elseif ($bmi &lt;= 29.99) {
            echo "You are classified as &lt;strong&gt;Overweight&lt;/strong&gt;."; 
        } else { 
            echo "You are classified as &lt;strong&gt;Obese&lt;/strong&gt;.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/bordercolor&gt;"; 
        }       
    }
}

?&gt;

&lt;?php echo $error;?&gt;
</code></pre>
