Jump to content

page constantly reloading?


localhost

Recommended Posts

if i use an iframe on the specified line:
    <?php echo "<div id='dm_1' class='hdn'>"; include('post.php'); echo "</div>"; ?>

it works fine, as opposed to using include, the page keeps reloading!! its rather annoying

here is my entire script:
[code]
<?php
session_start();
$loggedin = $_SESSION['username'];

include('../dc-inc/connect.php');
include('../dc-inc/config.php');

if(!$loggedin)
{
include('dc-login.php');
die();
}
?>

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<style type='text/css'>.hdn {display:none;}
.show {}
</style>

<script type='text/javascript'>
function click() {
    document.getElementById("dm_1").className = "show";
}
</script>


<title><?php echo "$SITE_NAME - Powered by Dc News"; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>

<center><div class="all">
<div class="box">
  <div class="menu"><a href="#">Home</a><a href="#">Links</a><a href="#">Contact</a></div>

<div class="header">
  <h1><span class="style1">Administrative</span> Panel </h1>
  </div>
<div class="content">
  <h1>Your control panel  </h1>
  <p>Main controls to help you get started:
  <Br />  
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <a href='#' onclick='if(document.getElementById("dm_1").className == "hdn") {document.getElementById("dm_1").className = "show"} else {document.getElementById("dm_1").className = "hdn"};return false;'>• Make a news post</a>
    <?php echo "<div id='dm_1' class='hdn'>"; include('post.php'); echo "</div>"; ?>

  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  • Edit your profile
  <br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  • Change your sites settings
  <Br />
  </div>
<div class="footer">Dc News <a href="http://developmentchat.com/"></a>Copyright &copy; 2006</div>

</div>
</div>
</center>
</body>
</html>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/15322-page-constantly-reloading/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.