localhost Posted July 22, 2006 Share Posted July 22, 2006 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 annoyinghere is my entire script:[code]<?phpsession_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 /> <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>"; ?> • Edit your profile <br /> • Change your sites settings <Br /> </div><div class="footer">Dc News <a href="http://developmentchat.com/"></a>Copyright © 2006</div> </div></div></center></body></html>[/code] Link to comment https://forums.phpfreaks.com/topic/15322-page-constantly-reloading/ Share on other sites More sharing options...
shocker-z Posted July 22, 2006 Share Posted July 22, 2006 it works fine, as opposed to using include, the page keeps reloading!! its rather annoyingWhat do you mean? when you put the whole iframe in the included file post.php it just makes the page reload??RegardsLiam Link to comment https://forums.phpfreaks.com/topic/15322-page-constantly-reloading/#findComment-62043 Share on other sites More sharing options...
localhost Posted July 22, 2006 Author Share Posted July 22, 2006 if i put it in an iframe, it works fine. using include makes it reload. Link to comment https://forums.phpfreaks.com/topic/15322-page-constantly-reloading/#findComment-62095 Share on other sites More sharing options...
wildteen88 Posted July 22, 2006 Share Posted July 22, 2006 Whats in post.php? Link to comment https://forums.phpfreaks.com/topic/15322-page-constantly-reloading/#findComment-62104 Share on other sites More sharing options...
redarrow Posted July 22, 2006 Share Posted July 22, 2006 Make a function page and add the function to the page using one include statement. Link to comment https://forums.phpfreaks.com/topic/15322-page-constantly-reloading/#findComment-62106 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.