page need refresh

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chelvan
    New Member
    • Aug 2008
    • 90

    page need refresh

    hi forums
    on my site all the pages ask refresh to load. its happened randomly. that means some time the page display its body some time its not.

    why?
    any one know the reason?


    thanks for u all

    chel-1
  • MarkoKlacar
    Recognized Expert Contributor
    • Aug 2007
    • 296

    #2
    Hi,

    Can you post a short example of the code that does this?

    /M

    Comment

    • ak1dnar
      Recognized Expert Top Contributor
      • Jan 2007
      • 1584

      #3
      Why don't you be a bit more specific about what you're trying to do, and perhaps we can help you out. This question is not clear at all.

      Comment

      • chelvan
        New Member
        • Aug 2008
        • 90

        #4
        Originally posted by ak1dnar
        Why don't you be a bit more specific about what you're trying to do, and perhaps we can help you out. This question is not clear at all.

        ok.
        here i post one of my page.

        myFriends.php

        Code:
        <?php
        session_start();
        $user_nom=$_SESSION['username'];
        $refno=$_SESSION['refno'];
        ?>
        <!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>
        <link href="tabset/tabstyle.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="tabset/tabmenu.js"></script>
        
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Untitled Document</title>
        <style type="text/css">
        <!--
        a {
        	font-family: Verdana;
        	font-weight: bold;
        	font-size: 12px;
        }
        a:link {
        	text-decoration: none;
        	color: #000000;
        }
        a:visited {
        	text-decoration: none;
        }
        a:hover {
        	text-decoration: none;
        	color: #FF0000;
        }
        a:active {
        	text-decoration: none;
        }
        body,td,th {
        	font-family: Verdana;
        	font-size: 11px;
        	font-weight: bold;
        }
        -->
        </style></head>
        
        <!--<body onLoad="tabmenu();msfix();">
        <div id="tab" class="tab" style="top:0px">&nbsp;</div>
        <div class="box">
        <h1 id="drop"></h1>
        <h1 id="reg"></h1>
        -->
        <body>
        <!--<img src='image/hifriends.jpg' align="middle"/>
        -->
        <?php
        //echo "
        $con=mysql_connect("localhost","root","iceberg");
        
        if(!$con){
        die('could not connect:'.mysql_error());
        }
        mysql_select_db("mydata",$con);
        
        $page_name="myFriends.php"; // If you use this code with a different page ( or file ) name then change this 
        
        
        $start=$_GET['start'];// To take care global variable if OFF
        if(!(isset($start))) { // This variable is set to zero for the first page
        $start = 0;
        }
        $url=$_GET['url'];
        /*echo $url;*/
        
        //echo "Friends<br>";
        
        $eu = ($start - 0);
        $limit = 3; // No of records to be shown per page.
        $c = $eu + $limit;
        $back = $eu - $limit;
        $next = $eu + $limit;
        
        
        
        /*echo $refno.'<br>';
        echo $eu.'<br>';
        echo $limit.'<br>';
        */
        
        $bgcolor="#f1f1f1";
        
        $query2=" SELECT * FROM myfriends where refno='$refno'";
        $result2=mysql_query($query2);
        echo mysql_error();
        $nume=mysql_num_rows($result2);//break 
        if($nume!=0){
        echo "<TABLE width=100% align=center cellpadding=0 cellspacing=0>";
        
        $query2=" SELECT * FROM myfriends where refno='$refno' limit $eu, $limit";
        $result22=mysql_query($query2);
        echo mysql_error();
        //$nume=mysql_num_rows($result2);//break 
        
        while($rr=mysql_fetch_array($result22)){
        	$fr=$rr['myfriend'];
        	$query=" SELECT * FROM user where refno='$fr' ";
        	$result=mysql_query($query);
        	while($noticia = mysql_fetch_array($result))
        	{
        		if($bgcolor=='#f1f1f1'){$bgcolor='#ffffff';}
        		else{$bgcolor='#f1f1f1';}
        		//$a_ref=
        		if (strpos($noticia[email],'/')!=0)
        		$noticia[email]=substr($noticia[email],0,strpos($noticia[email],'/'));
        			echo"<tr><td rowspan='5' aligh='middle'><img src='img/$noticia[prophoto]' width='115' height='120'></td></tr>";
        			echo "<tr><td>$noticia[fullname]</td><td width='100'></td><td><a href='viewgrps.php?$noticia[refno]'>View Groups</a>                  </td></tr>";
        			echo "<tr><td>$noticia[email]</td><td width='100'></td><td><a href='fralbpage.php?fr=$noticia[refno]'>View Albums</a></td></tr>";
        			echo "<tr><td>$noticia[birthdate]</td><td width='100'></td><td><a href='frepage.php?fr=$noticia[refno]'>View Events</a></td></tr>";
        			echo "<tr><td><a href='mymail.php?from=$noticia[refno]' title='Send Mail'><img src='image/email.jpg'></a>";
        			/*<a href='mymail.php?'>Send Message</a></td></tr>*/
        			echo"<tr><td>&nbsp;</td></tr>";
        	}
        }
        
        echo "</table>";
        
        
        
        echo "<table align = 'center'><tr><td >";
        if($back >=0) {
        print "<a href='$page_name?start=$back'><font face='Verdana' size='2'>PREV</font></a>";
        }
        echo "</td><td >";
        $i=0;
        $l=1;
        for($i=0;$i < $nume;$i=$i+$limit){
        if($i <> $eu){
        echo " <a href='$page_name?start=$i'><font face='Verdana' size='2'>$l</font></a> ";
        }
        else { echo "<font face='Verdana' size='4' color=red>$l</font>";} /// Current page is not displayed as link and given font color red
        $l=$l+1;
        }
        echo "</td><td>";
        if($c < $nume) {
        print "<a href='$page_name?start=$next'><font face='Verdana' size='2'>NEXT</font></a>";
        	}
        echo "</td></tr></table>";
        }else{
        echo "<p align='center'><font color='#006633' size='2'><b>!!! You Didn't Create Any More Community !!!</b></font></p>";
        }
        ?>
        <!--</div>-->
        
        </body>
        </html>

        thanks
        chel-1

        Comment

        Working...