Hi.. Can anybody tell me why my page doesnt fully appear until the refresh button is pressed. if you go to www.farena.co.uk/ap.php and enter a number between 1 and 5000 you will see what i mean. half the page will display, but the rest wont appear until the refresh button is pressed.
PHP Code:
<?php
[COLOR=Red]/*this code is the page that displays, the red parts are where i link to another php page (the page that doesnt display) which is shown below*/ [/COLOR] page too but does
session_start();
?>
<?php echo "
<html>
<head>
</head>
<body>
your aperture width is";
foreach ($_POST as $field => $apwidth)
{
echo " $apwidth ";
}
$_SESSION[ap] = "$apwidth";
?> mm
<?php
$overlap = 30;
$doorsize2 = (($apwidth + $overlap) / 2);
$doorsize3 = (($apwidth + ($overlap * 2)) / 3);
$doorsize4 = (($apwidth + ($overlap * 3)) / 4);
$doorsize5 = (($apwidth + ($overlap * 4)) / 5);
if ($apwidth <= '2000')
{
$numdoor='2';
echo "<br>you need $numdoor doors $doorsize2 mm wide each";
[COLOR=Red]include('glasstype.php');[/COLOR]
$_SESSION[doorsize] = "$doorsize2";
}
elseif ($apwidth <= '3000' and $apwidth >= '2001')
{
$numdoor='3';
echo "<br>you need $numdoor doors $doorsize3 mm wide each";
[COLOR=Red]include('glasstype.php');[/COLOR]
$_SESSION[doorsize] = "$doorsize3";
}
elseif ($apwidth <= '4000' and $apwidth >= '3001')
{
$numdoor='4';
echo "<br>you need $numdoor doors $doorsize4 mm wide each";
[COLOR=Red] include('glasstype.php');[/COLOR]
$_SESSION[doorsize] = "$doorsize4";
}
elseif ($apwidth <= '5000' and $apwidth >= '4001')
{
$numdoor='5';
echo "<br>you need $numdoor doors $doorsize5 mm wide each";
[COLOR=Red]include('glasstype.php');[/COLOR]
$_SESSION[doorsize] = "$doorsize5";
}
else
{
echo "<br> please call *******for assistance";
}
?>
<?php
{
echo "<a href=\"glasstype.php\"></a>";;
}
$_SESSION[numdoor] = "$numdoor";
?>
</body>
</html>
the part which doesnt display:
PHP Code:
<?php
session_start();
?>
<html>
<head>
</head>
<body>
<?php
{
echo "<br><br><br>now choose a glass type for each door:";
}
if ($_SESSION[numdoor] == '2')
{
include('2door.php');
}
elseif ($_SESSION[numdoor] == '3')
{
include('3door.php');
}
elseif ($_SESSION[numdoor] == '4')
{
include('4door.php');
}
elseif ($_SESSION[numdoor] == '5')
{
include('5door.php');
}
else
{
echo" $_SESSION[seekassist]";
}
?>
</body>
</html>
Thanks everybody
Last edited by hiptobesquare; 04-28-2005 at 01:34 PM..
|