browswer jumps to PGCBD after second of opening PHP page
Posted: Mon Oct 03, 2005 4:13 am
feyd | Please use
feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
My PHP skills are a bit patchy but i was hoping someone out there be able to help.
http://www.langlandsurf.com/LSD/test5.php
every now and then this page loads then jumps to a page with only http:/// in the address bar (with 3 slashes)
here is the code
*********************Code: Select all
<?
include("head.html");
//SQL connecting script not shown
$page = $_GET['page'];
// if a page isn't defined, we're on page one
if($page <= 0)
{
$page = 1;
}
// how many lines of data to display
$display = 6;
// where to start depending on what page we're viewing
$start = ($page * $display) - $display;
$resultfull = mysql_query("SELECT * FROM article ORDER BY id");
$result = mysql_query("SELECT * FROM article LIMIT $start, $display");
$keys = mysql_num_rows($resultfull);
$newspages = ($keys / $display);
//determine number of pages
$realstart = ($start + 1);
$finish = ($start + $display);
if ($finish > $keys) {
$finish = $keys; }
?>
<html><body>
<table width="100%" border="0">
<tr>
<td width="20%" valign="top" rowspan="2">
<table width="48%" border="0" align="left" bgcolor="#FF0000">
<tr>
<td bgcolor="#000000" height="2">
<div align="center"><font color="#FF0000"><b><font face="ARIAL">SURF
CHECK</font></b></font></div>
</td>
</tr>
<tr>
<td bgcolor="#FFFF99" height="289">
<div align="center"><font color="#000000" face="arial" size="2">LANGLAND
SURF CAM<br>
<a href="http://www.gowerlive.co.uk" target="_blank"><img src="glive.gif" width="179" height="62" border="0"><br>
<img src="http://www.gowerlive.co.uk/netcam.jpg" width="180" height="150" border="0"></a><br>
LLANGENNITH CAM<br>
</font><a href="http://www.llangennithsurf.com" target="_blank"><img src="http://www.llangennithsurf.com/webcam/showimage3.php" width="180" height="150" border="0"></a><br>
<font size="2" face="arial">WOOLACOMBE CAM<br>
<a href="http://www.eyeball-surfcheck.co.uk" target="_blank"><img src="http://www.eyeball-surfcheck.co.uk/digital_pictures/lg_woolacombe.jpg" width="180" height="150" border="0"></a></font></div>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" valign="top">
<div align="center"><a href="http://magicseaweed.com/Langland-Bay-Surf-Report/31" target="_blank"><font face="arial" size="2">Langland
forecast Magicseaweed.com</font></a></div>
</td>
</tr>
<tr>
<td bgcolor="#000000" valign="top" height="151">
<div align="center"><font size="2" face="ARIAL" color="#0000FF"><b><font color="#FFFFFF">WAM
MAP</font></b></font><br>
<a href="http://facs.scripps.edu/surf/images/eurwam00.gif" target="_blank"><img src="http://facs.scripps.edu/surf/images/euranim.gif" width="150" height="150" border="0"></a></div>
</td>
</tr>
<tr>
<td bgcolor="#000000" valign="top">
<div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-0631596477025881";
google_ad_width = 120;
google_ad_height = 240;
google_ad_format = "120x240_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "003366";
google_color_bg = "000000";
google_color_link = "FFFFFF";
google_color_url = "FF6600";
google_color_text = "FF6600";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</td>
</tr>
<tr>
<td bgcolor="#000000"> </td>
</tr>
</table>
</td>
<td rowspan="2" align="left" valign="top"> <table width="100%" border="1" cellpadding="0">
<tr>
<td bgcolor="#333333" height="10" bordercolor="#FF6600"> <div align="left">
<font color="#0000FF" face="Denmark"><strong><font color="#FF6600" size="5" face="arial">Langland
Surf Division</font><font color="#FF6600" size="5"><em><font face="Arial" color="#FFFFFF">
</font></em></font></strong></font><font color="#FFFFFF" face="Georgia, Times New Roman, Times, serif"><strong><em><font face="Arial">tales
from da</font></em></strong> <font color="#CC6600" size="5" face="Boulder">S</font></font><font color="#FFFFFF"><font color="#CC6600" size="5" face="Boulder">hitpipe</font></font>
</div>
<br> <font face="arial" size="2" color="white">
<?php
echo date("l dS of F Y h:i:s A");
?>
</font> </td>
</tr>
</table>
<table width="100%" border="1" cellpadding="0">
<tr>
<?
echo '<table width="100%" border=0 cellpadding=4><TR>';
$Counter = 0;
while ($news=mysql_fetch_assoc($result)){
if ($Counter % 1 == 0){
echo '</TR><TR>';
}
if (trim($news)){
echo '<TD width=100% valign="top" align="center"><img src="bar1.gif" width="100%" height="7">
<font color="#FFff00" size="3" face="arial"><b>'.$news[id].'<BR>'.$news[head].'</b></font><br><font color="#FFFFFF" size="1" face="arial">'.$news[content].'</font></TD>';
} else {
echo '<TD> </TD>';
}
$Counter++;
}
echo '</TR>';
echo '<TR><td align="center"><font color="#FFff00" size="3" face="arial"><There are <B>' . $keys . '</B> articles</font> <font color="#FF0000" size="3" face="arial"> You are on page: <b>' . $page . '</b> of <b>' . ceil($newspages) . '</b> Pages</font></TD>';
echo '<TR> <TD colspan="2" align="center"><font color="#FFff00" size="3" face="arial">| ';
//previous link
if ($page > 1){
echo '<a href="'.$PHP_SELF.'?page='.($page-1).'">PREV</a> | ';
}
//page list
if ($newspages != (int) $newspages){
for ($pageslist = 1; $pageslist <= $newspages+1; $pageslist++){
if ($pageslist != $page){
echo '<a href="'.$PHP_SELF.'?page='.$pageslist.'">';
echo $pageslist . '</a> | ';
} else {
echo '<B>'.$pageslist . '</B> | ';
}
}
} else {
for ($pageslist = 1; $pageslist <= $newspages; $pageslist++){
if ($pageslist != $page){
echo '<a href="'.$PHP_SELF.'?page='.$pageslist.'">';
echo $pageslist . '</a> | ';
} else {
echo '<B>'.$pageslist . '</B> | ';
}
}
}
//next link
if ($page != ceil($newspages)){
echo '<a href="'.$PHP_SELF.'?page='.($page+1).'">NEXT</a> |</font>';
}
?>
</tr>
</table>
<td width="10%" align="left" bgcolor="#000000" valign="top" height="61" bordercolor="#FF0000">
<table width="100%" border="1" cellpadding="0">
<tr>
<td bgcolor="#FFCC00"> <div align="right"><font size="2" face="ARIAL" color="#000000">ENTER
EMAIL</font> <font size="1" color="#000000">
<input type="text" name="textfield" maxlength="40">
<input type="submit" name="Submit" value="Submit">
</font></div></td>
</tr>
<tr>
<td bgcolor="#333333"> <div align="right"><font face="ARIAL" color="#FFFF00" size="2">VOTE
HERE</font></div></td>
</tr>
<tr>
<td bgcolor="#333333"> <form name="form2" method="post" action="">
<div align="right"><font face="ARIAL" color="#FFFF00" size="1">EGGS
<input type="radio" name="radiobutton" value="radiobutton">
</font></div>
<div align="right"><font face="ARIAL" color="#FFFF00" size="1">BACON
<input type="radio" name="radiobutton" value="radiobutton">
<BR>
<input type="submit" name="Submit2" value="Vote">
</font></div>
</form></td>
</tr>
</table>
<div align="center"><script type="text/javascript"><!--
google_ad_client = "pub-0631596477025881";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "003366";
google_color_bg = "000000";
google_color_link = "FFFFFF";
google_color_url = "FF6600";
google_color_text = "FF6600";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
</td>
</tr>
<tr>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td height="2"> </td>
<td height="2"> <div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-0631596477025881";
google_alternate_ad_url = "http://";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "333333";
google_color_bg = "000000";
google_color_link = "FFFFFF";
google_color_url = "999999";
google_color_text = "CCCCCC";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></td>
<td bgcolor="#FFFFFF" height="2"> <div align="center"><font size="1" face="ARIAL"><b>WEBSITE
HOSTED BY</b></font><BR>
<a href="http://www.mumbles.co.uk" target="_blank"><img src="mumbles.gif" border="0"></a>
</div></td>
</tr>
<tr>
<td colspan="3"> <div align="center"><font size="2" color="#FFFFFF">ABOUT
/ PIPELINE / HOMEGROWN / TRIPPIN / PARTY / LINKS / CONTACT US</font></div></td>
</tr>
</table>
</body></html>feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]