Page 1 of 1

Any ideas why?

Posted: Tue Jan 12, 2010 2:47 pm
by gaogier
Here is my code.

Code: Select all

<?php
$use_jquery = true;
include ('header.inc');
?>
                    <td width="5"><img src="image/specer.png" width="1" height="1"></td>
                    <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                          <tr align="left" valign="top">
                            <td width="8"><img src="image/th-midbody-left.jpg" width="8" height="29"></td>
                            <td class="t-header-bg"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td height="29" align="center" valign="middle" class="normal_text06">QUEST GUIDES</td>
                              </tr>
                            </table></td>
                            <td width="8"><img src="image/th-midbody-right.jpg" width="8" height="29"></td>
                          </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                          <tr align="left" valign="top">
                            <td width="1" bgcolor="#756649"><img src="image/specer.png" width="1" height="1"></td>
                            <td width="1" bgcolor="#A18E6E"><img src="image/specer.png" width="1" height="1"></td>
                            <td width="1" bgcolor="#474B48"><img src="image/specer.png" width="1" height="1"></td>
                             <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td height="1" align="left" valign="top" bgcolor="#474B48"><img src="image/specer.png" width="1" height="1"></td>
                              </tr>
                              <tr>
                                <td align="left" valign="top" class="box_4">
                                    <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <td>
<?php
 
function questview($id) {
 
require_once ('../mysql_connect.php');//connect to db
include ('includes/steps.php');
 /* query for item */
    $query = "SELECT * FROM quest WHERE id=$id";
    $result = mysql_query ($query);
    
    /* if we get no results back, error out */
$numrtn = mysql_num_rows($result);
 
    if ($numrtn == 0) {
        echo "The quest guide requested cannot be found\n";
        echo $id;
        return;
    }
    $row = mysql_fetch_assoc($result);
    /* easier to read variables and 
     * striping out tags */
    $id = $row['id'];
    $name = $row['name'];
    $contributors = $row['contributors'];
    $guideby = $row['guideby'];
    $added = $row['added'];
    $location = $row['startinglocation'];
    $members = $row['members'];
    $description = $row['description'];
    $difficulty = $row['difficulty'];
    $requirements = $row['requirements'];
    $items = $row['items'];
    $reward = $row['reward'];
    $guide = $row['mainbody'];
    $length = $row['length'];
    $updated = $row['updated'];
    if ($members == "Y") {
        $mem = "members only quest</b>, so it can only be done on a <b>members</b> server.";
    }else{
        $mem = "non-members quest</b>.";
    }
    if ($updated == 0){
    $up = 'No-one has updated this quest guide';    
    }else{  
    $date2 = date("l jS F Y @ H:i:s ", $updated);
    $up = 'It was last updated on '.$date2;
    }
    if ($contributors != ""){
    $con = 'Thanks also to <b>'.$contributors.'</b> for changes.';  
    }else{
    $con = 'No-one else has contributed to this quest guide.';
    }
    //$date = date("D M jS, Y g:i a", $added);
    $date = date("l jS F Y @ H:i:s ", $added);
    
echo '
<div id="quest"><table width="100%" border="0">
  <tr>
    <td>
        <h1 align="center">'.$name.'</h1>
';
echo step_js();
echo pick_clue($id);
echo toggle_reward();
echo toggle_clue();
echo '<br>';
echo '
<p class="text1">This quest guide was written by <b>'.$guideby.'</b> for use on Runehints and entered into the database on '.$date.'. '.$up.'. '.$con.'  <br /></p>
<p><span class="text1"><br />This quest is <b>'.$mem.'</span></p>
<p>
<span class="qtitle">Description: </span><span class="text1">'.$description.'</span></p>
<p><span class="qtitle">Difficulty Level: </span><span class="text1">'.$difficulty.'</span></p>
<p>
<span class="qtitle">Requirements: </span><span class="text1">'.$requirements.'</span></p>
 
<p>
<span class="qtitle">Items Needed During Quest: </span><span class="text1">'.$items.'</span></p>
<p>
<span class="qtitle">Starting Location: </span><span class="text1">'.$location.'</span></p>
  <p><span class="qtitles">Quest Instructions:</span></p>';
  echo list_steps($id, true);
echo '<p>
<div id="rewardwrap" style="display:none;"><span class="qtitle">Reward: </span><span class="text1">'.$reward.'</span></div></p>
  &nbsp;</td>
  </tr>
</table></div> ';
}
 
function selectquest(){
 
require_once ('../mysql_connect.php');//connect to db
global $sitestyle;
    ?>
      <?php
 
 
$result = mysql_query("SELECT * FROM quest");
 
$num_rows = mysql_num_rows($result);
?>
 
    <table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top" class="normal_text02"><div align="justify">There are a total of <? echo $num_rows; ?> quest guides in our database. There are Free guides and Member guides. On RuneHints, all guides are free to use, but the Member guides require you to be on a RuneScape Member server to use them.</div></td>
  </tr>
  <tr>
    <td height="15" align="left" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr align="left" valign="top">
        <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr align="left" valign="top">
                <td width="16"><img src="image/011.jpg" width="16" height="26"></td>
                <td align="left" valign="top" class="quest_033"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td height="26" align="center" valign="middle" class="normal_text07">FREE QUEST GUIDES</td>
                  </tr>
                </table></td>
                <td width="16"><img src="image/022.jpg" width="16" height="26"></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td align="left" valign="top" class="box_5"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <?php
    
              /* query for quests */
        $n_query = "SELECT id, name, difficulty, members, sorter FROM quest WHERE members='n' ORDER BY sorter ASC";
    
        $n_result = mysql_query ($n_query);
        while ($n_row = mysql_fetch_assoc($n_result)) {
        $n_name = $n_row['name'];  
        //$n_guideby = $n_row['guideby'];
        $n_difficulty = $n_row['difficulty'];
        $id = $n_row['id'];
        /* place table row data in 
         * easier to use variables.
         * & display the data */
              
       echo '<tr align="left" valign="top"><td width="275" class="normal_text05"><a href="quest.php?flibble=questview&id='.$id.'&ic=1" style="color:#EED8B4;"><b>'.$n_name.'</b></a></td><td>&nbsp;</td><td width="73" class="normal_text05">'.$n_difficulty.'</td></tr>'; 
    }
        /* finish up table*/
        ?>
            </table></td>
          </tr>
          <tr>
            <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr align="left" valign="top">
                <td width="49"><img src="image/0022.jpg" width="49" height="17"></td>
                <td height="17" bgcolor="#69582D"><img src="image/specer.png" width="1" height="1"></td>
                <td width="49"><img src="image/0033.jpg" width="49" height="17"></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="20"><img src="image/specer.png" width="1" height="1"></td>
        <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr align="left" valign="top">
                <td width="16"><img src="image/011.jpg" width="16" height="26"></td>
                <td class="quest_033"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td height="26" align="center" valign="middle" class="normal_text07">MEMBER QUEST GUIDES</td>
                  </tr>
                </table></td>
                <td width="16"><img src="image/022.jpg" width="16" height="26"></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td align="left" valign="top" bgcolor="#675A45" class="box_5"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <?php
 
    /* query for quests */
        $y_query = "SELECT id, name, difficulty, members, sorter FROM quest WHERE members='y' ORDER BY sorter ASC";
    $y_result = mysql_query ($y_query);
        while ($y_row = mysql_fetch_assoc($y_result)) {
        $y_name = $y_row['name'];  
        //$y_guideby = $y_row['guideby'];
        $y_difficulty = $y_row['difficulty'];
        $yid = $y_row['id'];
 
        /* place table row data in 
         * easier to use variables.
         * & display the data */
 
        echo '<tr align="left" valign="top"><td width="275" class="normal_text05"><a href="quest.php?flibble=questview&id='.$yid.'&ic=1" style="color:#EED8B4;"><b>'.$y_name.'</b></a></td><td>&nbsp;</td><td width="73" class="normal_text05">'.$y_difficulty.'</td></tr>'; 
        }
 
        /* finish up table*/?>
                                                                                                    
            </table></td>
          </tr>
          <tr>
            <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr align="left" valign="top">
                <td width="49"><img src="image/0022.jpg" width="49" height="17"></td>
                <td height="17" bgcolor="#69582D"><img src="image/specer.png" width="1" height="1"></td>
                <td width="49"><img src="image/0033.jpg" width="49" height="17"></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
 
 
                                   
    <?php
    }
    
    
    switch($_GET['flibble']) {
    
    case 'selectquest':
        selectquest();
        break;
    case 'questview':
        questview($_GET['id']);
        break;      
    default:
        selectquest();
}
    
?>
                        </td></tr></table>
                        </td></tr></table>
                        </td>
                        <td width="1" bgcolor="#756649"><img src="image/specer.png" width="1" height="1"></td>
                        <td width="1" bgcolor="#A18E6E"><img src="image/specer.png" width="1" height="1"></td>
                        <td width="1" bgcolor="#474B48"><img src="image/specer.png" width="1" height="1"></td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr align="left" valign="top">
                        <td width="63"><img src="image/0a.jpg" width="63" height="20"></td>
                        <td valign="bottom"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td height="17" align="left" valign="top" bgcolor="#746232"><img src="image/specer.png" width="1" height="1"></td>
                          </tr>
                          <tr>
                            <td height="1" align="left" valign="top" bgcolor="#474B48"><img src="image/specer.png" width="1" height="1"></td>
                          </tr>
                          <tr>
                            <td height="1" align="left" valign="top" bgcolor="#A18E6E"><img src="image/specer.png" width="1" height="1"></td>
                          </tr>
                          <tr>
                            <td height="1" align="left" valign="top" bgcolor="#756649"><img src="image/specer.png" width="1" height="1"></td>
                          </tr>
                        </table></td>
                        <td width="63"><img src="image/0b.jpg" width="63" height="20"></td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td height="5" align="left" valign="top"><img src="image/specer.png" width="1" height="1"></td>
                  </tr>
                </table></td>
                <td width="5"><img src="image/specer.png" width="1" height="1"></td>
              </tr>
              
            </table>
<?
 
include('footer.inc');
 
?>
Here is the problem. http://runehints.com/quest.php Here is what it should look like, http://runehints.com Both use the header/footer file.


If you don't see the problem, the site is cut off at site stats there has to be something in that code stopping it. I can not see it, can you?

Re: Any ideas why?

Posted: Tue Jan 12, 2010 3:18 pm
by AbraCadaver
Just a guess, but this is the only place you use a short open tag, and they may not be supported on the server:

Code: Select all

<?
//try using <?php
 
include('footer.inc');
 
?>

Re: Any ideas why?

Posted: Tue Jan 12, 2010 3:35 pm
by gaogier
Good spot, however, fixed and still not working.

I am using the exact same script on my tester place found here, http://systemmnew.runehints.com/quest.php

Re: Any ideas why?

Posted: Tue Jan 12, 2010 3:42 pm
by AbraCadaver
This should show you:

Code: Select all

error_reporting(E_ALL);
ini_set('display_errors', '1');
If not then post footer.inc.

Re: Any ideas why?

Posted: Tue Jan 12, 2010 3:46 pm
by gaogier
I get this,

Notice: Undefined index: flibble in /home/gaogier/public_html/quest.php on line 254

Alot more errors on home page HAHAH

Re: Any ideas why?

Posted: Tue Jan 12, 2010 4:07 pm
by AbraCadaver
gaogier wrote:I get this,

Notice: Undefined index: flibble in /home/gaogier/public_html/quest.php on line 254

Alot more errors on home page HAHAH
Post footer.inc.

Re: Any ideas why?

Posted: Tue Jan 12, 2010 4:13 pm
by gaogier

Code: Select all

             </td>
            <td width="178"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                        <tr align="left" valign="top">
                          <td width="8" height="29"><img src="image/rightcol-th-01.jpg" width="8" height="30"></td>
                          <td valign="top" class="right-col-th-bg"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td height="30" align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                <tr align="left" valign="top">
                                  <td width="30" height="29" align="center" valign="middle"><img src="image/arrow.jpg" width="17" height="9"></td>
                                  <td width="5"><img src="image/specer.png" width="1" height="1"></td>
                                  <td valign="middle" class="th_text">Recent Posts</td>
                                </tr>
                              </table></td>
                            </tr>
                          </table></td>
                          <td width="8"><img src="image/rightcol-th-02.jpg" width="8" height="30"></td>
                        </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td height="20" align="left" valign="top" class="rightcol-bg"><table width="100%"  border="0" cellspacing="8" cellpadding="0">
                      <tr>
                        <td align="left" valign="top" class="normal_text01"><p><center><marquee scrollamount="2" direction="up" height="200" scrolldelay="1" onMouseOver="this.stop()" onMouseOut="this.start()">             <?php
require_once ('../mysql_connect1.php');//connect to db
   
$forumQ=mysql_query("SELECT p.topic_id, p.forum_id, p.post_subject, u.user_id, u.username_clean, u.user_colour
FROM phpbb_posts AS p
INNER JOIN phpbb_users AS u
ON p.poster_id = u.user_id
WHERE p.post_approved=1
ORDER BY p.topic_id DESC
LIMIT 20");
while($forumRow = mysql_fetch_assoc($forumQ)){
echo " <a href=forums/viewtopic.php?f=".$forumRow['forum_id']."&t=".$forumRow['topic_id'].">".$forumRow['post_subject']."</a><br>&nbsp;&nbsp;&nbsp;Author: <a href='./memberlist.php?mode=viewprofile&u=".$forumRow['user_id']."' style='color: ".$forumRow['user_colour'].";'>".$forumRow['username_clean']."</a><br><br>
";
}
 
?>
<br /><br />
 
<a href="/forums/">RuneHints<br />
The Solution to all your RuneScape Problems</a></marquee></center>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                        <tr align="left" valign="top">
                          <td width="10"><img src="image/leftcol-box1-bot-left.jpg" width="10" height="16"></td>
                          <td class="leftcol-bot-mid-bg">&nbsp;</td>
                          <td width="10"><img src="image/leftcol-box1-bot-right.jpg" width="10" height="16"></td>
                        </tr>
                    </table></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="5" align="left" valign="top"><img src="image/specer.png" width="1" height="1"></td>
              </tr>
              <tr>
                <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                          <tr align="left" valign="top">
                            <td width="8" height="29"><img src="image/rightcol-th-01.jpg" width="8" height="30"></td>
                            <td valign="top" class="right-col-th-bg"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td height="30" align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                      <tr align="left" valign="top">
                                        <td width="30" height="29" align="center" valign="middle"><img src="image/arrow.jpg" width="17" height="9"></td>
                                        <td width="5"><img src="image/specer.png" width="1" height="1"></td>
                                        <td valign="middle" class="th_text">Forum Stats</td>
                                      </tr>
                                  </table></td>
                                </tr>
                            </table></td>
                            <td width="8"><img src="image/rightcol-th-02.jpg" width="8" height="30"></td>
                          </tr>
                      </table></td>
                    </tr>
                    <tr>
                      <td height="20" align="left" valign="top" class="rightcol-bg"><table width="100%"  border="0" cellspacing="8" cellpadding="0">
                          <tr>
                            <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td height="20" align="left" valign="middle" class="normal_text01"><?php include_once('fostats.php') ?></td>
                              </tr>
                              <tr>
                                <td align="left" valign="top">&nbsp;</td>
                              </tr>
                            </table></td>
                          </tr>
                      </table></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                          <tr align="left" valign="top">
                            <td width="10"><img src="image/leftcol-box1-bot-left.jpg" width="10" height="16"></td>
                            <td class="leftcol-bot-mid-bg">&nbsp;</td>
                            <td width="10"><img src="image/leftcol-box1-bot-right.jpg" width="10" height="16"></td>
                          </tr>
                      </table></td>
                    </tr>
                </table></td>
              </tr>
              <tr>
                <td height="5" align="left" valign="top"><img src="image/specer.png" width="1" height="1"></td>
              </tr>
              <tr>
                <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                          <tr align="left" valign="top">
                            <td width="8" height="29"><img src="image/rightcol-th-01.jpg" width="8" height="30"></td>
                            <td valign="top" class="right-col-th-bg"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td height="30" align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                      <tr align="left" valign="top">
                                        <td width="30" height="29" align="center" valign="middle"><img src="image/arrow.jpg" width="17" height="9"></td>
                                        <td width="5"><img src="image/specer.png" width="1" height="1"></td>
                                        <td valign="middle" class="th_text">Site Stats</td>
                                      </tr>
                                  </table></td>
                                </tr>
                            </table></td>
                            <td width="8"><img src="image/rightcol-th-02.jpg" width="8" height="30"></td>
                          </tr>
                      </table></td>
                    </tr>
                    <tr>
                      <td height="20" align="left" valign="top" class="rightcol-bg"><table width="100%"  border="0" cellspacing="8" cellpadding="0">
                          <tr>
                            <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td height="20" align="left" valign="middle" class="normal_text01"><?php include_once('aguestonline.php') ?><br><?php include('totals.inc'); ?></td>
                              </tr>
                              <tr>
                                <td align="left" valign="top">&nbsp;</td>
                              </tr>
                            </table></td>
                          </tr>
                      </table></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                          <tr align="left" valign="top">
                            <td width="10"><img src="image/leftcol-box1-bot-left.jpg" width="10" height="16"></td>
                            <td class="leftcol-bot-mid-bg">&nbsp;</td>
                            <td width="10"><img src="image/leftcol-box1-bot-right.jpg" width="10" height="16"></td>
                          </tr>
                      </table></td>
                    </tr>
                </table></td>
              </tr>
              <tr>
                <td height="5" align="left" valign="top"><img src="image/specer.png" width="1" height="1"></td>
              </tr>
              <tr>
                <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                          <tr align="left" valign="top">
                            <td width="8" height="29"><img src="image/rightcol-th-01.jpg" width="8" height="30"></td>
                            <td valign="top" class="right-col-th-bg"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td height="30" align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                      <tr align="left" valign="top">
                                        <td width="30" height="29" align="center" valign="middle"><img src="image/arrow.jpg" width="17" height="9"></td>
                                        <td width="5"><img src="image/specer.png" width="1" height="1"></td>
                                        <td valign="middle" class="th_text">Poll</td>
                                      </tr>
                                  </table></td>
                                </tr>
                            </table></td>
                            <td width="8"><img src="image/rightcol-th-02.jpg" width="8" height="30"></td>
                          </tr>
                      </table></td>
                    </tr>
                    <tr>
                      <td height="20" align="left" valign="top" class="rightcol-bg"><table width="100%"  border="0" cellspacing="8" cellpadding="0">
                          <tr>
                            <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td height="20" align="left" valign="middle" class="normal_text01"><?php
require_once ('mysql_connect.php');//connect to db
    $current_query = "SELECT * FROM poll_current";
    if ($current_result = mysql_query($current_query)) {
      $current_row = mysql_fetch_array($current_result);
      $current = $current_row['poll_num'];
    }
    
    if(isset($_POST['submit']) && ctype_digit($_POST['vote'])) {
      $query = 'UPDATE poll_answers SET votes=votes+1 WHERE choice=' . $_POST['vote'] .' && poll_num='.$current;
      $result = mysql_query($query);
      ob_end_clean();
      setcookie ('vote', 'voted', time()+1209600, '/', 'runehints.com', '0');
      ob_end_clean();
      header("Location: http://runehints.com/");
      require_once ('../mysql_connect.php');//connect to db
    }
    
    if (isset($_COOKIE['vote']))  
{   
    $question_query = 'SELECT * FROM poll_questions WHERE poll_num='.$current;
    if($question_result = mysql_query($question_query)) {
        $question_row = mysql_fetch_array($question_result);
        $question = $question_row['question'];
 
    $num_votes_query = 'SELECT SUM(votes) AS sumvotes
    FROM poll_answers WHERE poll_num='.$current;
 
    if ($result = mysql_query($num_votes_query)) {
      $row = mysql_fetch_array($result);
      $sum = $row['sumvotes'];
    }
    $totals_query = 'SELECT activity, votes FROM poll_answers WHERE poll_num='.$current.' ORDER BY choice ASC';
    if ($result = mysql_query($totals_query)) {
    echo '<font class="small2">'.$question.'<br /><br />';
    echo '<table width="100%" cellpadding="1" cellspacing="0" border="0" style="font-family: Verdana; font-size: 9px; color: #efefef">';
        
      while($row = mysql_fetch_array($result)) {
        $percent = round($row['votes'] * 100 / $sum);
        echo '<tr><td width="3"></td><td width="100%" colspan="3">'. $row['activity'];
        echo '</td><td width="3"></td></tr><tr><td width="3"></td><td width="100%"><table width="100%"><tr><td height="9" width="'. $percent .'" background="http://www.runehints.com/images/bar.png"></td><td></td></tr></table></td><td width="3"></td><td width="0" align="right">'. $row['votes'] .'</td><td width="3"></td></tr>';
      }
      echo '<table cellpadding="0" cellspacing="0" border="0"><tr><td height="3"></td></tr></table><font style="font-size: 9px"><center><i>Votes:&nbsp;'.$sum.'</i></center></font>'; 
      
    }else{
    echo '<font class="small2">Sorry no polls are currently active</font>';
    }
}   
    
}else{
    $question_query = 'SELECT * FROM poll_questions WHERE poll_num='.$current;
    if($question_result = mysql_query($question_query)) {
        $question_row = mysql_fetch_array($question_result);
        $question = $question_row['question'];
        
        
          
        $form_query = 'SELECT * FROM poll_answers WHERE poll_num='.$current;
        if($result = mysql_query($form_query)) {
            echo '<form action='.$_SERVER['PHP_SELF'].' method="post">';
            echo '<font class="small2">'.$question.'<br />';
            while($row = mysql_fetch_array($result)) {
           
                echo '<input type="radio" name="vote" value=' . $row['choice'] . '>'. $row['activity'] . '<br />';
             }
                echo '<center><input name="submit" type="submit" value="Vote!"></form></center>';
            
        }
 
    }else{
        echo '<font class="small2">Sorry no polls are currently active </font>'; 
    }
 
}
?></td>
                                </tr>
                            </table></td>
                          </tr>
                      </table></td>
                    </tr>
                    <tr>
                      <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                          <tr align="left" valign="top">
                            <td width="10"><img src="image/leftcol-box1-bot-left.jpg" width="10" height="16"></td>
                            <td class="leftcol-bot-mid-bg">&nbsp;</td>
                            <td width="10"><img src="image/leftcol-box1-bot-right.jpg" width="10" height="16"></td>
                          </tr>
                      </table></td>
                    </tr>
                </table></td>
              </tr>
              <tr>
                <td align="left" valign="top">&nbsp;</td>
              </tr>
              <tr>
                <td align="left" valign="top">&nbsp;</td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr align="left" valign="top">
            <td width="10"><img src="image/footer_left-bg.jpg" width="10" height="90"></td>
            <td class="footer_bg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="30" align="center" valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="link_text02">Home</a> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#" class="link_text02">Forums</a> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="link_text02">Desktop</a> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#" class="link_text02">Dragon Knight RPG</a> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#" class="link_text02">Contact Us</a> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#" class="link_text02">Staff Info</a> |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="#" class="link_text02">Top Sites</a></td>
              </tr>
              <tr>
                <td align="center" valign="top" class="normal_text01">Copyright &copy; 2004-2009 RuneHints.com. All Rights Reserved.<br>This site is not official and is in no ways affiliated with RuneScape. <br>All images related to Runescape are the property of Jagex Ltd.<br>Runescape™ is a trademark of Jagex Software © 1999-2009 Andrew Gower and Jagex®, Ltd.</td>
              </tr>
            </table></td>
            <td width="10"><img src="image/footer_right-bg.jpg" width="10" height="90"></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
 
<?php ob_flush(); ?>

Re: Any ideas why?

Posted: Tue Jan 12, 2010 5:14 pm
by AbraCadaver
It must be a different footer.inc if it working on other pages, because you have a parse error on line 139, no ;

Code: Select all

<?php include_once('aguestonline.php') ?>