Hi All,
I would like to know what's wrong with the following code and how to correct it. The result.php file is not showing any frames.
Acutally using frames is not my target,
On the otherhand, I appericiate the help from anybody who can suggest something else instead of using frames to let the result.php file show the same result I'm trying to reach with frames?
the code for the form file :
<html>
<head>
<title>Insert your weight and height</title>
</head>
<body>
<form action="result.php" method="post">
Your weight: <input type="text" name="weight" />
Your height: <input type="text" name="height" />
<input type="submit" />
<p> </p>
</form>
</body>
</html>
the code for file result.php :
<html>
<head>
<title>Result</title>
</head>
<body>
<?php
$wt=$POST["weight"];
$ht=$POST["height"];
?>
<?php
if ($wt>=70 && $wt<85)
if ($ht>=170 && $ht<180)
{ $img="images/normal-weight.gif";
$cond="Your weight is within normal limits";
$lf="http://www.yahoo.com";}
if ($wt>=95 && $wt<110)
if ($ht>=160 && $ht<170)
{ $img="images/over-weight.gif";
$cond="You are over weight";
$lf="http://www.google.com";}
?>
<frameset rows="20%,80%" >
<frame src="upperframe.php" scrolling="no">
<frame src="<?php print "$lf" ?>" scrolling="auto" target="_self">
<noframes>
</noframes>
</frameset>
</body>
</html>
the code for the upperframe.php file:
<html>
<head>
<title>Upper frame</title>
</head>
<body>
<?php
echo "<img src=\"$img\">";
echo "<br>";
echo "$cond";
?>
</body>