Jump to content

Page Content Not Showing


hellbringer80

Recommended Posts

i have been making this site for my onling gaming team. Everything seems to work fine but for some reason the content on the command page won't work. I have only coded the profiles, members page, console, and matches page so far. For some reason everything shows up except when I go to the match_options.php page and the content doesn't show up. Also, the users profile won't show up either. The following pages in order are. The site can be viewed at www.team-lockdown.net/audacity The test login is Username: Admin Password: admin123
1. functions.php (including both the profile page, and the match options.
2. matches.php (displays the matches to everyone)
3. profile.php (displays the users profile)
4. match_options.php (gives you the options to edit the matches page)

functions.php
[code]// This function displays the profile of any user.  This is shown in the
// main login, and in the profile page.

function displayProfile($user, $ip) {
  global $fontString, $tbheader, $fontCo, $fontcolor, $tableColor, $tableString;

  $result = @mysql_query("SELECT * FROM members WHERE username = \"$user\"");
  $row = mysql_fetch_array($result);
  extract($row);

  $result = @mysql_query("SELECT * FROM status WHERE id = \"1\"");
  $row = mysql_fetch_array($result);
  extract($row);

  $days = calcDays($username);
  $dsl = calcDSL($username);
  $prom = calcPromo($username);
  $percentage = ($recruits / $num_mems) * 100;

echo("
<center>
<table>
<tr><td><img src=images/$rank.gif>");

$rank = getRankByNum($rank);

echo("
  </td>
    <td>$fontString
<font size=4><b> &nbsp;$fname $username $lname
</font></b></center>
</td></tr>
  </table>");

echo("


<table border=0 width=$tablewidth>
<tr><td width=30%>Player Alias</td><td width=70%>$username</td></tr>
<tr><td>Real Name</td><td>$fname $lastname</td></tr>
<tr><td>Email</td><td>$email</td></tr>
<tr><td>Status</td><td>$rank</td></tr>
<tr><td>Location</td><td>$city $state</td></tr>
<tr><td>Age</td><td>$age</td></tr>
<tr><td>Quote</td><td>$quote</td></tr>
</table>");
}


// Display Matches

function dispmatches()
{
  global $fontString, $tableColor, $tbheader, $tablewidth;

  echo("
<center>
    <table width=$tablewidth align=center border=0 cellspacing=0>
    <tr><td colspan=4>
        <center><b>$fontString
        <font size=5>Matches</font>
</b><br><BR>
    </td></tr>
<center>
        <tr><td width=20% bgcolor=$tableColor background=$tbheader>
            <b><font color=#FFFFFF size=2 face=verdana><center>
            Opponent</font><br></b>
        </td><td width=20% bgcolor=$tableColor background=$tbheader>
            <b><font color=#FFFFFF size=2 face=verdana><center>
            Score</font><br></b>
        </td><td width=60% bgcolor=$tableColor background=$tbheader>
            <b><font color=#FFFFFF size=2 face=verdana><center>
            Demo</font><br></b>
        </td></tr>

  ");

  $result = @mysql_query("SELECT * FROM match");
  while($row = mysql_fetch_array($result)) {
    extract($row);

    echo("
        <tr><td width=20% bgcolor=$tableColor>
            $fontString
            <center>Audacity vs. $opponent<br><br>
        </td><td width=20% bgcolor=$tableColor>
            $fontString
            <center>$score<br><br>
        </td><td width=60% bgcolor=$tableColor>
            $fontString
            <center>$demo<br><br>
        </td></tr>

    ");
  }

  echo("
    </table>
  ");
}
[/code]

Matches.php
[code]<?php

$username = $usercook;
$password = $passcook;
setcookie("usercook", $username);
setcookie("passcook", $password);

require("functions.php");


dispmatch();


include("footer.php");

?>[/code]

profile.php
[code]<?php

$username = $usercook;
$password = $passcook;
setcookie("usercook", $username);
setcookie("passcook", $password);

require("functions.php");


displayProfile($user, $ip);


include("footer.php");

?>[/code]

match_options.php
[code]<?php

$username = $usercook;
$password = $passcook;
setcookie("usercook", $username);
setcookie("passcook", $password);

require("functions.php");


if(authenticate($username, $password, 2)) {
  global $fontString, $tableColor, $tablewidth;

  dispmatch();

  echo("
    <p>
    <table width=$tablewidth cellspacing=0 cellpadding=0>
    <tr><td>
        <center><b>$fontString
        <font size=2>Match Options</font>
    </td></tr>
    <tr><td width=$tablewidth bgcolor=$tableColor><center>
        $fontString <b>
        <a href=add_match.php>Add Match</a> <b>|</b>
         <a href=rem_match.php>Remove Match</a> <b>|</b>
         <a href=mod_match.php>Modify Match</a> </b></center>
    </td></tr>
      <tr><td bgcolor=$tableColor colspan=2><br>
<center><font size=2 face=verdana><b><a href=main.php>Return to main menu</font></b></center>
      </td></tr>
    </table>
  ");
}


include("footer.php");

?>[/code]
Link to comment
Share on other sites

Oh, you're getting for paid for it and we have to help out and you're in a hurry.

Let's see. It could be what appears to be an assumption that register_globals is ON when it might (should) be off on the production server; it could be that none of the queries are actually working the way you expected. Try recoding them so that they display errors if errors exist (and not suppressing the errors as well). It could be a scope problem with variables in functions. It could be that the problems exist in functions for which you haven't provided code. Or it could be who knows what.
Link to comment
Share on other sites

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.