My page is not cached !!! why
Posted: Sun Feb 24, 2008 10:56 pm
As the subject suggests , my page is not cached in the browser , what can be the problem?
my page structure is this:
my page structure is this:
Code: Select all
<?php
session_start();
include("includes/photo.inc.php");
include("includes/title.inc.php");
$in="index";
if (! @include('includes/connection.inc.php')) {
echo 'Sorry, database unavailable';
exit;
}
define('SHOWMAX',5);
$conn = dbConnect('query');
$getTotal = 'SELECT COUNT(*) FROM news';
$total = $conn->query($getTotal);
$row = $total->fetch_row();
$totalPix = $row[0];
$curPage = isset($_GET['curPage']) ? $_GET['curPage'] : 0;
$conn = dbConnect('query');
$startRow = $curPage * SHOWMAX;
$sql = "SELECT * FROM news ORDER By created DESC LIMIT $startRow,".SHOWMAX;
$result = $conn->query($sql) or die(mysqli_error());
$row = $result->fetch_assoc();
include("includes/log.inc.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ryde Secondary College <?php echo "—{$titl}"; ?></title>
<link href="contents/thrColHybHdr.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.thrColHybHdr #sidebar1, .thrColHybHdr #sidebar2 { padding-top: 30px; }
.thrColHybHdr #mainContent { zoom: 1; padding-top: 15px; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
</head>
<body class="thrColHybHdr">
<div id="container">
<div id="header">
<div align="right" id="logo">
<a class="title"><?php echo "$titl"; ?></a>
<img id="bos" src="contents/images/board_of_studies_nsw_05.gif" alt="Board of Studies" width="157" height="36" /><img src="contents/images/logo_det.gif" alt="Department of Education" name="det" width="100" height="41" id="det" /><a href="http://www.tafensw.edu.au/"><img src="contents/images/LOGOTAFE.gif" alt="TAFE" name="tafe" width="55" height="41" border="0" id="tafe" /></a></div>
<!-- end #header --></div>
<div id="container2">
<table class="container2" >
<tr>
<td align="center" valign="top" id="sidebar2">
<div id="calender"> <?php include("includes/calender.inc"); ?></div>
<div id="LeftMenu"><?php include("includes/imenus1.inc"); ?></div>
</td>
<td style="width:10px" background="contents/images/Sh_left.gif"> </td>
<td id="mainContent">
<div id="menu" >
<?php include("includes/imenus0.inc"); ?>
</div>
<div id="text">
<?php do { ?>
<h3><?php echo $row['title'] ?></h3><br>
<div align="right"><?php echo $row['created'] ?></div><br>
<?php echo nl2br($row['body']) ?>
<?php
$row = $result->fetch_assoc();
} while ($row);
?><br />
<div id="page">
<?php
if ($curPage > 0) {
echo '<a href="'.$_SERVER['PHP_SELF'].'?curPage='.($curPage-1).'">< Prev</a>';
}
else {
echo ' ';
}
?>•°•
<?php
if ($startRow+SHOWMAX < $totalPix) {
echo '<a href="'.$_SERVER['PHP_SELF'].'?curPage='.($curPage+1).'">Next ></a>';
}
else {
echo ' ';
}
?>
</div>
</div> </td>
<td style="width:10px" background="contents/images/Sh_right.gif"> </td>
<td align="center" valign="top" id="sidebar1">
<div id="image-box">
<div id="image">
<img src="pictures/<?php echo $img ?>" width="150"> </div>
</div>
<div id="login-box">
<?php if( isset($_SESSION['authenticated'])) { ?>
Welcome <?php echo $_SESSION['user'] ; ?> </br>
You are logged in </br>
<a href="user/index.php">My control pannel </a>
<?php } else { ?>
<form id="form1" name="form1" method="POST" action="">
<p>
<label>
<input name="username" type="text" id="name" value="User name" size="10" />
</label>
</p>
<p>
<label>
<input name="pwd" type="password" id="pass" value="Pass" size="12" />
</label>
</p>
<p align="right">
<input name="login" type="submit" id="login" value="Log in" />
</p>
</form>
<?php } ?>
<h6><?php echo "$error"; ?></h6>
</div>
</td>
</tr>
</table>
<br class="clearfloat" />
</div>
<div id="footer">
<?php include("includes/footer.inc"); ?>
<!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>