Connecting Tech Pros Worldwide Help | Site Map

page need refresh

chelvan's Avatar
Member
 
Join Date: Aug 2008
Location: Colombo 06, Srilanka
Posts: 86
#1: Nov 3 '08
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's Avatar
Expert
 
Join Date: Aug 2007
Location: Stockholm, Sweden
Posts: 294
#2: Nov 3 '08

re: page need refresh


Hi,

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

/M
ak1dnar's Avatar
Moderator
 
Join Date: Jan 2007
Location: Colombo
Posts: 1,439
#3: Nov 3 '08

re: page need refresh


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.
chelvan's Avatar
Member
 
Join Date: Aug 2008
Location: Colombo 06, Srilanka
Posts: 86
#4: Nov 4 '08

re: page need refresh


Quote:

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

Expand|Select|Wrap|Line Numbers
  1.  
  2. <?php
  3. session_start();
  4. $user_nom=$_SESSION['username'];
  5. $refno=$_SESSION['refno'];
  6. ?>
  7. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  8. <html xmlns="http://www.w3.org/1999/xhtml">
  9. <head>
  10. <link href="tabset/tabstyle.css" rel="stylesheet" type="text/css" />
  11. <script type="text/javascript" src="tabset/tabmenu.js"></script>
  12.  
  13. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  14. <title>Untitled Document</title>
  15. <style type="text/css">
  16. <!--
  17. a {
  18.     font-family: Verdana;
  19.     font-weight: bold;
  20.     font-size: 12px;
  21. }
  22. a:link {
  23.     text-decoration: none;
  24.     color: #000000;
  25. }
  26. a:visited {
  27.     text-decoration: none;
  28. }
  29. a:hover {
  30.     text-decoration: none;
  31.     color: #FF0000;
  32. }
  33. a:active {
  34.     text-decoration: none;
  35. }
  36. body,td,th {
  37.     font-family: Verdana;
  38.     font-size: 11px;
  39.     font-weight: bold;
  40. }
  41. -->
  42. </style></head>
  43.  
  44. <!--<body onLoad="tabmenu();msfix();">
  45. <div id="tab" class="tab" style="top:0px">&nbsp;</div>
  46. <div class="box">
  47. <h1 id="drop"></h1>
  48. <h1 id="reg"></h1>
  49. -->
  50. <body>
  51. <!--<img src='image/hifriends.jpg' align="middle"/>
  52. -->
  53. <?php
  54. //echo "
  55. $con=mysql_connect("localhost","root","iceberg");
  56.  
  57. if(!$con){
  58. die('could not connect:'.mysql_error());
  59. }
  60. mysql_select_db("mydata",$con);
  61.  
  62. $page_name="myFriends.php"; // If you use this code with a different page ( or file ) name then change this 
  63.  
  64.  
  65. $start=$_GET['start'];// To take care global variable if OFF
  66. if(!(isset($start))) { // This variable is set to zero for the first page
  67. $start = 0;
  68. }
  69. $url=$_GET['url'];
  70. /*echo $url;*/
  71.  
  72. //echo "Friends<br>";
  73.  
  74. $eu = ($start - 0);
  75. $limit = 3; // No of records to be shown per page.
  76. $c = $eu + $limit;
  77. $back = $eu - $limit;
  78. $next = $eu + $limit;
  79.  
  80.  
  81.  
  82. /*echo $refno.'<br>';
  83. echo $eu.'<br>';
  84. echo $limit.'<br>';
  85. */
  86.  
  87. $bgcolor="#f1f1f1";
  88.  
  89. $query2=" SELECT * FROM myfriends where refno='$refno'";
  90. $result2=mysql_query($query2);
  91. echo mysql_error();
  92. $nume=mysql_num_rows($result2);//break 
  93. if($nume!=0){
  94. echo "<TABLE width=100% align=center cellpadding=0 cellspacing=0>";
  95.  
  96. $query2=" SELECT * FROM myfriends where refno='$refno' limit $eu, $limit";
  97. $result22=mysql_query($query2);
  98. echo mysql_error();
  99. //$nume=mysql_num_rows($result2);//break 
  100.  
  101. while($rr=mysql_fetch_array($result22)){
  102.     $fr=$rr['myfriend'];
  103.     $query=" SELECT * FROM user where refno='$fr' ";
  104.     $result=mysql_query($query);
  105.     while($noticia = mysql_fetch_array($result))
  106.     {
  107.         if($bgcolor=='#f1f1f1'){$bgcolor='#ffffff';}
  108.         else{$bgcolor='#f1f1f1';}
  109.         //$a_ref=
  110.         if (strpos($noticia[email],'/')!=0)
  111.         $noticia[email]=substr($noticia[email],0,strpos($noticia[email],'/'));
  112.             echo"<tr><td rowspan='5' aligh='middle'><img src='img/$noticia[prophoto]' width='115' height='120'></td></tr>";
  113.             echo "<tr><td>$noticia[fullname]</td><td width='100'></td><td><a href='viewgrps.php?$noticia[refno]'>View Groups</a>                  </td></tr>";
  114.             echo "<tr><td>$noticia[email]</td><td width='100'></td><td><a href='fralbpage.php?fr=$noticia[refno]'>View Albums</a></td></tr>";
  115.             echo "<tr><td>$noticia[birthdate]</td><td width='100'></td><td><a href='frepage.php?fr=$noticia[refno]'>View Events</a></td></tr>";
  116.             echo "<tr><td><a href='mymail.php?from=$noticia[refno]' title='Send Mail'><img src='image/email.jpg'></a>";
  117.             /*<a href='mymail.php?'>Send Message</a></td></tr>*/
  118.             echo"<tr><td>&nbsp;</td></tr>";
  119.     }
  120. }
  121.  
  122. echo "</table>";
  123.  
  124.  
  125.  
  126. echo "<table align = 'center'><tr><td >";
  127. if($back >=0) {
  128. print "<a href='$page_name?start=$back'><font face='Verdana' size='2'>PREV</font></a>";
  129. }
  130. echo "</td><td >";
  131. $i=0;
  132. $l=1;
  133. for($i=0;$i < $nume;$i=$i+$limit){
  134. if($i <> $eu){
  135. echo " <a href='$page_name?start=$i'><font face='Verdana' size='2'>$l</font></a> ";
  136. }
  137. else { echo "<font face='Verdana' size='4' color=red>$l</font>";} /// Current page is not displayed as link and given font color red
  138. $l=$l+1;
  139. }
  140. echo "</td><td>";
  141. if($c < $nume) {
  142. print "<a href='$page_name?start=$next'><font face='Verdana' size='2'>NEXT</font></a>";
  143.     }
  144. echo "</td></tr></table>";
  145. }else{
  146. echo "<p align='center'><font color='#006633' size='2'><b>!!! You Didn't Create Any More Community !!!</b></font></p>";
  147. }
  148. ?>
  149. <!--</div>-->
  150.  
  151. </body>
  152. </html>
  153.  
  154.  

thanks
chel-1
Reply