Jump to content

Recommended Posts

So i dont know whats wrong (can see reference site here: http://sgi-clan.info/gnomes/) but the site certiantly dosnt look like it should. I happen to know its from my random sponser code, but its not working could somone please revise this and tell me any erros you see so i can fix this problem.

 

        <?php
		$randoms = array();
$start =1;
$total =11;
		while (count($random) < 3) {
  $random = mt_rand($start,$total);
  if (!in_array($random, $randoms)) {
    $randoms[] = $random;
  }
}
$captions = array("RBC","Prodomax","Liews Motors","Advanced Motion Controls","Burnside","TD Canada Trust","Reinhart","SCDSB","ARO","Stayner Lions","test","ComTek");
$urls = array("http://www.royalbank.com", "http://prodomax.com/","http://a-m-c.com/","http://www.rjburnside.com/","http://tdcanadatrust.com","http://www.reinhartfoods.com/", "http://www.scdsb.on.ca/", "http://www.aronet.com/", "http://www.lionsclubs.org/","test","http://www.comtekcomputers.com/");

for ( $i = 0; $i < 3; $i++){
print $randoms[$i];
  $caps = ($captions[$randoms[$i]]);
  print $caps[$i];
  $img = ($urls[$randoms[$i]]);
  print $img[$i];
  print $random[$i];
}

?>


              <td align="center"><img src="images/random/<?=$random[1].".jpg"?>" height="25"/> </td>
            </tr>
            <tr>
              <td align="center"><a href="<?=$img[1]?>" class="link"><?=$caps[1]?></a></td>

Link to comment
https://forums.phpfreaks.com/topic/143995-uh-i-dont-know-whats-wrong/
Share on other sites

change

 

for ( $i = 0; $i < 3; $i++){

print $randoms[$i];

  $caps = ($captions[$randoms[$i]]);

  print $caps[$i];

  $img = ($urls[$randoms[$i]]);

  print $img[$i];

  print $random[$i];

}

 

to

 

for ( $i = 0; $i < 3; $i++){
print $randoms[$i];
  $caps = $captions[$randoms[$i]];
  print $caps;
  $img = $urls[$randoms[$i]];
  print $img;
  print $random[$i];
}

still not luck, i think it has something to do with the way im trying to display them in these lines:

 

<?php for ( $i = 0; $i < 3; $i++){
print $randoms[$i];
  $caps = $captions[$randoms[$i]];;
  $img = $urls[$randoms[$i]];
}

?>


              <td align="center"><img src="images/random/<?=$random[1].".jpg"?>" height="25"/> </td>
            </tr>
            <tr>
              <td align="center"><a href="<?=$img[1]?>" class="link"><?=$caps[1]?></a></td>
            </tr>
            <tr>
              <td align="center" class="dotline"> </td>
            </tr>
            <tr>
              <td align="center"><img src="images/random/<?=$randoms[2].".jpg"?>"  height="25" /></td>
            </tr>
            <tr>
              <td align="center"><a href="<?=$img[2]?>" class="link"><?=$caps[2]?></a></td>
            </tr>

change;

 

              <td align="center"><img src="images/random/<?=$random[1].".jpg"?>" height="25"/> </td>

            </tr>

            <tr>

              <td align="center"><a href="<?=$img[1]?>" class="link"><?=$caps[1]?></a></td>

            </tr>

            <tr>

              <td align="center" class="dotline"> </td>

            </tr>

            <tr>

              <td align="center"><img src="images/random/<?=$randoms[2].".jpg"?>"  height="25" /></td>

            </tr>

            <tr>

              <td align="center"><a href="<?=$img[2]?>" class="link"><?=$caps[2]?></a></td>

            </tr>

 

to;

 

              <td align="center"><img src="images/random/<?php echo $random.".jpg" ?>" height="25"/> </td>
            </tr>
            <tr>
              <td align="center"><a href="<?php echo $img ?>" class="link"><?=$caps?></a></td>
            </tr>
            <tr>
              <td align="center" class="dotline"> </td>
            </tr>
            <tr>
              <td align="center"><img src="images/random/<?php echo $randoms.".jpg" ?>"  height="25" /></td>
            </tr>
            <tr>
              <td align="center"><a href="<?php echo $img ?>" class="link"><?php echo $caps ?></a></td>
            </tr>

should look like: http://www.sgi-clan.info/gnomes/index.html

 

Currently looks like: http://www.sgi-clan.info/gnomes/index.php

 

 

 

i know about the banners and whatnot, im talking about the things below the video player (half way down and lowe)

Entire page here:

 

 

<?php

include ("connect.php");
?>


<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Home of the Gnomes</title>
<script type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<style type="text/css">
<!--
.style1 {color: #E68B57}
.style2 {font-size: 9px}
-->
</style>
</head>

<body>
<table width="974" border="0" align="center" cellpadding="0" cellspacing="0" class="topbg">
  <tr>
    <td width="45"><table border="0" cellpadding="0" cellspacing="8">
      <tr>
        <td width="33"> </td>
      </tr>
      <tr>
        <td> </td>
      </tr>
      <tr>
        <td> </td>
      </tr>
    </table></td>
    <td width="929"><img src="images/top.jpg" width="883" height="195" /></td>
  </tr>
</table>
<table width="975" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="459"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="12" valign="top" class="pagebg"><img src="images/leftbtncorner.jpg" width="12" height="21" /></td>
        <td class="btnlinebg"><table border="0" align="center" cellpadding="0" cellspacing="1">
          <tr>
            <td width="58" align="center"><a href="index.php" class="toplink">HOME</a></td>
            <td width="58" align="center"><a href="team.php" class="toplink">TEAM</a></td>
            <td width="58" align="center"><a href="sponsers.php" class="toplink">SPONSORS</a></td>
            <td width="58" align="center"><a href="download.php" class="toplink">DOWNLOAD</a></td>
            <td width="58" align="center"><a href="forums/index.php" class="toplink">FORUM</a></td>
            <td width="58" align="center"><a href="movies.php" class="toplink">MEDIA</a></td>
            <td width="58" align="center"><a href="images.php?album=0" class="toplink">GALLERY</a></td>
          </tr>
        </table></td>
        <td width="12" valign="top" class="pagebg"><img src="images/rightbtncorner.jpg" width="12" height="21" /></td>
      </tr>
    </table>
      <table width="100%" height="26" border="0" cellpadding="0" cellspacing="0" class="topline">

        <tr>
          <td align="center"><span class="blacktext"><a href="http://www.sgi-360.com/forums/viewforum.php?f=1" class="link">Have a question, try <span class="style1">contacting us!</span></a><span class="style1"><a href="http://www.sgi-360.com/forums/viewforum.php?f=14" class="link"></a></span></span></td>

        </tr>
    </table></td>
    <td width="517"><form id="form1" name="form1" method="post" action="">
      <table height="26" border="0" cellpadding="0" cellspacing="0" class="pagebg">
        <tr>
          <td width="116" valign="top"><img src="images/gnomelogo2.gif" width="117" height="22" /></td>
          <td width="218" valign="bottom" class="TOPLINEBG"><table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="60" align="right">Username:</td>

                <td width="105"><input name="textfield3" type="text" class="textfield" value="username" /></td>
                <td width="31"><a href="http://sgi-clan.info/gnome/ucp.php?mode=register&sid=4d1e69f1366a55f73f9806b0e366066b"><img src="images/modifiedfinalsliced_17.jpg" width="31" height="14" border="0" /></a></td>
              </tr>
          </table></td>
          <td valign="bottom"><img src="images/right.jpg" width="182" height="26" /></td>
        </tr>
      </table>
      <table width="100%" height="26" border="0" align="center" cellpadding="0" cellspacing="0" class="topline">
        <tr>

          <td width="116" align="center" valign="bottom"><a href="index.php"><img src="images/modifiedfinalsliced_40.gif" width="107" height="18" vspace="3" border="0" /></a></td>
          <td valign="top"><table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="60" align="right">Password:</td>
                <td width="105"><input name="textfield2" type="password" class="textfield" value="password" /></td>
                <td width="31"><a href="http://sgi-clan.info/gnome/ucp.php?mode=login"><img src="images/index_33.gif" width="31" height="15" border="0" /></a></td>
              </tr>
          </table></td>

          <td align="center"><img src="images/user.gif" width="11" height="13" hspace="3" align="absmiddle" /><span class="blacktext">USERS:</span><span class="redtext">35753</span> <span class="blacktext">MEMBERS:</span><span class="redtext">5637</span></td>
        </tr>
      </table>
        </form>
    </td>
  </tr>

</table>
<table width="974" border="0" align="center" cellpadding="0" cellspacing="1" class="middleline">
  <tr valign="top">
    <td height="5" colspan="2"></td>
  </tr>
  <tr valign="top">
    <td width="406"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="blackbg">
      <tr>
        <td><img src="images/black1.jpg" width="3" height="3" /></td>
        <td align="right"><img src="images/black2.jpg" width="3" height="3" /></td>
      </tr>
    </table>
      <table width="100%" border="0" align="center" cellspacing="0" class="blackbg">
        <tr>
        <tr>
          <td><img src="images/latestthreads.jpg" width="200" height="23" /></td>
          <td><img src="images/latestdownload.jpg" width="200" height="23" /></td>
        </tr>
        <tr>
          <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="3">
<td height="18" class="bluetext"><img src="images/title.jpg" width="30" height="7" /></td>
<td colspan="2" align="right" class="bluetext"><img src="images/posted.jpg" width="37" height="7" /></td>
            <?php

$newitems =  mysql_query ("SELECT * FROM phpbb_posts JOIN phpbb_topics ON (phpbb_posts.topic_id = phpbb_topics.topic_id) ORDER BY post_time DESC LIMIT 4") or die(mysql_error());// for the newest posts.
   while($row = mysql_fetch_array($newitems)) {
   $title = $row["topic_title"];
	$name = $row["topic_first_poster_name"];

	if (strlen ($row["topic_first_poster_name"]) >6) {

	while (strlen($name) >6){
	$name = substr($name,0,-1);

	}

	}
if (strlen ($row["topic_title"]) > 27){



while (strlen ($title) > 27){

$title = substr($title,0,-1);
}






}

if (strlen ($name) == 6){
$name .="...";
}

if (strlen ($title) == 27){

$title .="...";
}

?>

            <tr>
              <td> <a class="whitelink" href="http://sgi-clan.info/gnome/viewtopic.php?f=<?=$row["forum_id"]?>&t=<?=$row["topic_id"]?>"><?php print $title;?></a>               </td>
             
              <td><a class="whitelink"  style="text-align:right" href="http://sgi-clan.info/gnome/memberlist.php?mode=viewprofile&u=<?=$row["topic_poster"];?>"><?php print $name;?></a></td>
              
<?php } ?>
          </table></td>
          <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="3">
            <tr>
              <td height="18" class="bluetext"><img src="images/title.jpg" width="30" height="7" /></td>
              <td colspan="2" align="right" class="bluetext"><img src="images/rating.jpg" width="37" height="7" /></td>
            </tr>

            <tr>
              <td width="30">00/00</td>
              <td><a href="#" class="whitelink">sGi Wallpaper Pack</a></td>
              <td><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /></td>
            </tr>
            <tr>
              <td>00/00</td>

              <td><a href="#" class="whitelink">The sGi Movie</a></td>
              <td><img src="images/star2.gif" width="11" height="13" /><img src="images/star2.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /></td>
            </tr>
            <tr>
              <td>00/00</td>
              <td><a href="#" class="whitelink">Custom sGi Steam Skin</a></td>
              <td><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /></td>
            </tr>
            <tr>
              <td>00/00</td>
              <td><a href="#" class="whitelink">CS:S Movie Demo Reel</a></td>
              <td><img src="images/star2.gif" width="11" height="13" /><img src="images/star2.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /></td>
            </tr>
          </table></td>
        </tr>

        <tr>
          <td><a href="#"><img src="images/viewforums.jpg" width="200" height="19" border="0" /></a></td>
          <td><a href="#"><img src="images/viewdownload.jpg" width="200" height="19" border="0" /></a></td>
        </tr>
        <tr>
          <td><img src="images/latestmedia.jpg" width="200" height="23" /></td>
          <td><img src="images/latestgallery.jpg" width="200" height="23" /></td>
        </tr>
        <tr>

          <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="3">
            <tr>
              <td height="18" class="bluetext"><img src="images/title.jpg" width="30" height="7" /></td>
              <td colspan="2" align="right" class="bluetext"><img src="images/rating.jpg" width="37" height="7" /></td>
            </tr>
            <tr>
              <td width="30">00/00</td>
              <td><a href="#" class="whitelink">sGi Wallpaper Pack</a></td>

              <td><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /></td>
            </tr>
            <tr>
              <td>00/00</td>
              <td><a href="#" class="whitelink">The sGi Movie</a></td>
              <td><img src="images/star2.gif" width="11" height="13" /><img src="images/star2.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /></td>
            </tr>
            <tr>

              <td>00/00</td>
              <td><a href="#" class="whitelink">Custom sGi Steam Skin</a></td>
              <td><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /></td>
            </tr>
            <tr>
              <td>00/00</td>
              <td><a href="#" class="whitelink">CS:S Movie Demo Reel</a></td>

              <td><img src="images/star2.gif" width="11" height="13" /><img src="images/star2.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /><img src="images/star.gif" width="11" height="13" /></td>
            </tr>
          </table></td>
          <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="3">
            <tr>
              <td height="18" colspan="2" align="right" class="bluetext"><img src="images/event.jpg" width="32" height="7" /></td>
                 <?php

$newitems =  mysql_query ("SELECT * FROM phpbb_files ORDER BY id DESC LIMIT 4") or die(mysql_error());// for the newest posts.
   while($row = mysql_fetch_array($newitems)) {
   $title = $row["name"];
	$name = "admin";

	if (strlen ($name) >6) {

	while (strlen($name) >6){
	$name = substr($name,0,-1);

	}

	}
if (strlen ($row["name"]) > 27){



while (strlen ($title) > 27){

$title = substr($title,0,-1);
}






}

if (strlen ($name) == 6){
$name .="...";
}

if (strlen ($title) == 27){

$title .="...";
}

?>

            <tr>
              <td> <?php print $title;?></a>   </td>
             
              <td><a class="whitelink"  style="text-align:right" href="http://sgi-clan.info/gnomes/images.php"></a></td>
              
<?php } ?>
          </table></td>
        </tr>

        <tr>
          <td><a href="#"><img src="images/viewmedia.jpg" width="200" height="19" border="0" /></a></td>
          <td><a href="#"><img src="images/viewgallery.jpg" width="200" height="19" border="0" /></a></td>
        </tr>
      </table>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="blackbg">
        <tr>
          <td><img src="images/black3.jpg" width="3" height="3" /></td>
          <td align="right"><img src="images/black4.jpg" width="3" height="3" /></td>
        </tr>
      </table></td>
    <td height="293" align="center"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','552','height','297','src','player','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','wmode','transparent','movie','player' ); //end AC code
    </script>
      <noscript>
      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="552" height="297">
        <param name="movie" value="player.swf" />
        <param name="quality" value="high" />
        <param name="wmode" value="transparent" />
        <embed src="player.swf" width="552" height="297" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>
      </object>
      </noscript>    </td>
  </tr>
</table>
<table width="974" height="795" border="0" align="center" cellpadding="0" cellspacing="1" class="pagebg">
  <tr valign="top">
    <td width="245" class="line"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="blackbg">
      <tr>
        <td><img src="images/modifiedfinalsliced_137.gif" width="243" height="24" /></td>
      </tr>
      <tr>
        <td><iframe id="main" scrolling="no" width="243" height="170" frameborder="0" src="team.html"></iframe>
	</td>
      </tr>
      <tr>
        <td><img src="images/modifiedfinalsliced_156.gif" width="243" height="23" /></td>
      </tr>
      
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr class="sgititlebg">
            <td align="center"><strong class="redtext">Regionals</strong></td>
            <td align="center"><strong class="greentext">Wins</strong></td>
            <td align="center"><strong class="blue">Ties</strong></td>
            <td align="center"><strong class="redtext">Losses</strong></td>
          </tr>
          <tr class="sgibg">
            <td align="center" class="redtext">Regional One</td>
            <td align="center" class="greentext">000</td>
            <td align="center" class="blue">00</td>
            <td align="center" class="redtext">000</td>
          </tr>
          <tr class="sgibg">
            <td align="center" class="redtext">Regional Two</td>
            <td align="center" class="greentext">000</td>
            <td align="center" class="blue">00</td>
            <td align="center" class="redtext">000</td>
          </tr>
          <tr class="sgibg">
            <td align="center" class="redtext">Overall </td>
            <td align="center" class="greentext">000</td>
            <td align="center" class="blue">00</td>
            <td align="center" class="redtext">000</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><img src="images/modifiedfinalsliced_223.gif" width="244" height="24" /></td>
      </tr>
      <tr>
        <td><img src="images/newsimg.jpg" width="243" height="169" /></td>
      </tr>
      <tr>
        <td nowrap="nowrap" class="whitetext">   <span class="style2"> September 9, 2007 Racs takes to the field with new <br />
  found Australian FIFA star Haroutig after his first place<br />
  finish in the Region 6 qualifiers. <a href="#" class="style1">read more</a></span></td>
      </tr>
    </table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="blackbg">
        <tr>
          <td><img src="images/black3.jpg" width="3" height="3" /></td>
          <td align="right"><img src="images/black4.jpg" width="3" height="3" /></td>
        </tr>
      </table>
</td>
    <td width="190"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/modifiedfinalsliced_138.gif" width="177" height="25" /></td>
      </tr>
      <tr>
        <td class="sponsorbg"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="5">
            <tr>
              <td align="center"> </td>
            </tr>
            <tr>
            <?php
		$randoms = array();
$start =1;
$total =11;
		while (count($random) < 3) {
  $random = mt_rand($start,$total);
  if (!in_array($random, $randoms)) {
    $randoms[] = $random;
  }
}
$captions = array("RBC","Prodomax","Liews Motors","Advanced Motion Controls","Burnside","TD Canada Trust","Reinhart","SCDSB","ARO","Stayner Lions","test","ComTek");
$urls = array("http://www.royalbank.com", "http://prodomax.com/","http://a-m-c.com/","http://www.rjburnside.com/","http://tdcanadatrust.com","http://www.reinhartfoods.com/", "http://www.scdsb.on.ca/", "http://www.aronet.com/", "http://www.lionsclubs.org/","test","http://www.comtekcomputers.com/");

for ( $i = 0; $i < 3; $i++){
print $randoms[$i];
  $caps = $captions[$randoms[$i]];;
  $img = $urls[$randoms[$i]];
}

?>


          <td align="center"><img src="images/random/<?php echo $random.".jpg" ?>" height="25"/> </td>
            </tr>
            <tr>
              <td align="center"><a href="<?php echo $img ?>" class="link"><?=$caps?></a></td>
            </tr>
            <tr>
              <td align="center" class="dotline"> </td>
            </tr>
            <tr>
              <td align="center"><img src="images/random/<?php echo $randoms.".jpg" ?>"  height="25" /></td>
            </tr>
            <tr>
              <td align="center"><a href="<?php echo $img ?>" class="link"><?php echo $caps ?></a></td>
            </tr>

            <tr>
              <td align="center" class="dotline"> </td>
            </tr>
            <tr>
              d align="center"><img src="images/random/<?php echo $randoms.".jpg" ?>"  height="25" /></td>
            </tr>
            <tr>
              <td align="center"><a href="<?php echo $img ?>" class="link"><?php echo $caps ?></a></td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td><img src="images/modifiedfinalsliced_204.gif" width="179" height="24" /></td>
      </tr>
      <tr>
        <td class="sponsorbg"><table width="94%" border="0" align="center" cellpadding="0" cellspacing="5">
            <tr>
              <td align="center"> </td>
            </tr>
            <tr>
              <td align="center"><img src="images/first_toronto.png" width="160" height="100" /></td>
            </tr>
            <tr>
              <td align="center"><a href="http://www.firstroboticscanada.org" class="redtext style2">http://www.firstroboticscanada.org</a></td>
            </tr>
            <tr>
              <td align="center" class="dotline"> </td>
            </tr>
            <tr>
              <td align="center"><img src="images/first_toronto.png" width="160" height="100" /></td>
            </tr>
            <tr>
              <td align="center"><a href="http://www.firstrobotics.uwaterloo.ca" class="link"><span class="redtext style2">http://www.firstrobotics.uwaterloo.ca</span></a></td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td><img src="images/modifiedfinalsliced_250.gif" width="176" height="20" /></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="3">
            <tr>
              <td><strong class="blacktext">How do you like the new site?</strong></td>
            </tr>
            <tr>
              <td class="blacktext"><input name="radiobutton" type="radio" value="radiobutton" />
                Alright</td>
            </tr>
            <tr>
              <td class="blacktext"><img src="images/line.gif" width="100" height="8" /></td>
            </tr>
            <tr>
              <td class="blacktext"><input name="radiobutton" type="radio" value="radiobutton" />
                Amazing</td>
            </tr>
            <tr>
              <td class="blacktext"><img src="images/line.gif" width="120" height="8" /></td>
            </tr>
            <tr>
              <td class="blacktext"><input name="radiobutton" type="radio" value="radiobutton" />
                Horrible</td>
            </tr>
            <tr>
              <td class="blacktext"><img src="images/line.gif" width="60" height="8" /></td>
            </tr>
            <tr>
              <td class="blacktext"><input name="radiobutton" type="radio" value="radiobutton" />
                Bad</td>
            </tr>
            <tr>
              <td class="blacktext"><img src="images/line.gif" width="80" height="8" /></td>
            </tr>
        </table></td>
      </tr>
    </table>
    <table width="100%" border="0">
        <tr>
          <td width="43%"> </td>
          <td width="22%"><img src="images/vote.jpg" width="31" height="14" /></td>
          <td width="35%">View Details</td>
        </tr>
    </table></td>
    <td width="550"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/modifiedfinalsliced_140.gif" width="546" height="24" /></td>
      </tr>
      <tr>
        <td height="22" class="newsinfobg"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td class="blacktext"><strong>NEW TEAM WEBSITE : PLEASE READ! </strong></td>
            <td align="right"><img src="images/flag.jpg" width="18" height="12" hspace="5" align="absmiddle" /><a href="http://www.sgi-360.com/forums/profile.php?mode=viewprofile&u=2" class="redtext">PhySiQu3 sGi</a></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="22"><img src="images/modifiedfinalsliced_159.jpg" width="544" height="119" vspace="2" /></td>
      </tr>
      <tr>
        <td class="line2"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td class="blacktext"><?php
            

/*$insertpost="INSERT INTO phpbb_index (message, title) values('testing this','test')";
      mysql_query($insertpost) or die("Could not insert post"); //insert post*/

            
		$query =  mysql_query ("SELECT * FROM phpbb_index ORDER BY messageid DESC LIMIT 4") or die(mysql_error());//
		while ($message == mysql_fetch_array ($query)){
		$message2 = $message['message'];

		print $message2;
		}


		?></td>
          </tr>
          <tr>
            <td align="right"><a href="#"><img src="images/modifiedfinalsliced_233.gif" width="59" height="14" border="0" /></a></td>
          </tr>
        </table>          </td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="line3">
          <tr>
            <td><img src="images/corner1.jpg" width="3" height="3" /></td>
            <td width="3"><img src="images/corner2.jpg" width="3" height="3" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="22" class="newsinfobg"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td class="blacktext"><strong>NEW TEAM WEBSITE : PLEASE READ! </strong></td>
            <td align="right"><img src="images/flag.jpg" width="18" height="12" hspace="5" align="absmiddle" /><a href="http://www.sgi-360.com/forums/profile.php?mode=viewprofile&u=2" class="redtext">PhySiQu3 sGi</a></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="22"><img src="images/modifiedfinalsliced_159.jpg" width="544" height="119" vspace="2" /></td>
      </tr>
      <tr>
        <td class="line2"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td class="blacktext"><p> </p>
                <p>The site is currently undergoing ALOT of work. The Media player does not work because we need to get it converted <br />
                  into flash. This will take a little bit more time then the rest but soon enough the entire site will be fully functioning <br />
                  properly.</p>
              <p>If you havent yet, Please take the time to register with the forums. <a href="#" class="redtext">Click Here</a></p>
              <p>If you have Questions at all, Please feel free to contact PhySiQu3 sGi as he is the man to ask. If you are intrested<br />
                in joining up with Team sGi, Please post your recruiting application via the forums.</p>
              <p>Thats all for today, If anyone wants to give there feedback, comments etc.. please do so by registering with the forums<br />
                and posting your thoughts about todays topic there.</p>
              <p>Thank you all once again and have a nice day,<br />
                - PhySiQu3 sGi</p></td>
          </tr>
          <tr>
            <td align="right"><a href="#"><img src="images/modifiedfinalsliced_233.gif" width="59" height="14" border="0" /></a></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="line3">
          <tr>
            <td><img src="images/corner1.jpg" width="3" height="3" /></td>
            <td width="3"><img src="images/corner2.jpg" width="3" height="3" /></td>
          </tr>
        </table></td>
      </tr>
      
    </table></td>
  </tr>
</table>
<table width="974" border="0" align="center" cellpadding="0" cellspacing="0" class="pagebg">
  <tr>
    <td height="50" align="center" class="blacktext">Copyright © Team Cyber Gnomes 2009<br />
      <a href="www.sgi-360.com" class="redtext">www.Team2013.com</a></td>
  </tr>
</table>
</body>
</html>

I think you need to go through and sort your html out first, that's probably where the underlying problem is, and after a quick look I found this bit of code;

 

<table width="974" height="795" border="0" align="center" cellpadding="0" cellspacing="1" class="pagebg">

  <tr valign="top">

    <td width="245" class="line"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="blackbg">

      <tr>

        <td><img src="images/modifiedfinalsliced_137.gif" width="243" height="24" /></td>

      </tr>

      <tr>

 

Openning a table, row and cell, followed by another row and cell isn't the way to do it!

i checked out the source HTML of both the working html and the faulty php-generated html. the php 1 just stops here:

        <td class="sponsorbg"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="5"> 
            <tr> 
              <td align="center"> </td> 
            </tr> 
            <tr> 

 

the working html continues for a quite a while and ends properly (</html>).

as a result, there's probably a fatal php error here (this is the php code immediately after the point where the faulty html ends):

            <?php
		$randoms = array();
$start =1;
$total =11;
		while (count($random) < 3) {
  $random = mt_rand($start,$total);
  if (!in_array($random, $randoms)) {
    $randoms[] = $random;
  }
}
$captions = array("RBC","Prodomax","Liews Motors","Advanced Motion Controls","Burnside","TD Canada Trust","Reinhart","SCDSB","ARO","Stayner Lions","test","ComTek");
$urls = array("http://www.royalbank.com", "http://prodomax.com/","http://a-m-c.com/","http://www.rjburnside.com/","http://tdcanadatrust.com","http://www.reinhartfoods.com/", "http://www.scdsb.on.ca/", "http://www.aronet.com/", "http://www.lionsclubs.org/","test","http://www.comtekcomputers.com/");

for ( $i = 0; $i < 3; $i++){
print $randoms[$i];
  $caps = $captions[$randoms[$i]];;
  $img = $urls[$randoms[$i]];
}

?>

 

turn on error reporting and post any errors you get when loading the page please

 

ok, sorry i've been busy however i got the error error:

 

Notice: Undefined variable: random in /home/sgiclan/public_html/gnomes/index.php on line 402

 

and below is the code using random:

 

  <?php
		$randoms = array();
$start =1;
$total =11;
		while (count($random) < 3) {
  $random = mt_rand($start,$total);
  if (!in_array($random, $randoms)) {
    $randoms[] = $random;
  }
}
$captions = array("RBC","Prodomax","Liews Motors","Advanced Motion Controls","Burnside","TD Canada Trust","Reinhart","SCDSB","ARO","Stayner Lions","test","ComTek");
$urls = array("http://www.royalbank.com", "http://prodomax.com/","http://a-m-c.com/","http://www.rjburnside.com/","http://tdcanadatrust.com","http://www.reinhartfoods.com/", "http://www.scdsb.on.ca/", "http://www.aronet.com/", "http://www.lionsclubs.org/","test","http://www.comtekcomputers.com/");

for ( $i = 0; $i < 3; $i++){
print $randoms[$i];
  $caps = $captions[$randoms[$i]];;
  $img = $urls[$randoms[$i]];
}

?>


          <td align="center"><img src="images/random/<?php echo $random.".jpg" ?>" height="25"/> </td>
            </tr>
            <tr>
              <td align="center"><a href="<?php echo $img ?>" class="link"><?=$caps?></a></td>
            </tr>
            <tr>
              <td align="center" class="dotline"> </td>
            </tr>
            <tr>
              <td align="center"><img src="images/random/<?php echo $randoms.".jpg" ?>"  height="25" /></td>
            </tr>
            <tr>
              <td align="center"><a href="<?php echo $img ?>" class="link"><?php echo $caps ?></a></td>
            </tr>

            <tr>
              <td align="center" class="dotline"> </td>
            </tr>
            <tr>
              d align="center"><img src="images/random/<?php echo $randoms.".jpg" ?>"  height="25" /></td>
            </tr>
            <tr>
              <td align="center"><a href="<?php echo $img ?>" class="link"><?php echo $caps ?></a></td>
            </tr>
        </table></td>
      </tr>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.