Length:
Width:

“;

if ($_POST[length]){
$_SESSION[length] = $_POST[length];
} elseif(!$_SESSION[length]) {
$_SESSION[length] = 10;
}
if ($_POST[width]){
$_SESSION[width] = $_POST[length];
} elseif(!$_SESSION[width]) {
$_SESSION[width] = 10;
}

echo “  “;

echo “

“;
for ($i=0; $i <$_SESSION[length]; $i++){ echo " “;
for ($j=0;$j<$_SESSION[width];$j++){ $block = $i."x".$j; if ($_SESSION[area][$block]){ $disp = "“;
$show = “yes”;
} else {
$disp = “+“;
$show = “no”;
}
if ($show == “yes”){
echo “

“;
} else {
echo “

“;
}

}
echo “

“;
}
echo “

$disp $disp

“;

foreach ($_SESSION[area] as $key=>$val){
$count = $count + $val;
}

echo “Total area =”.$count.” sq ft”;