PHP problem

09/21/2011 11:37 [ADMIN]Cryptic#1
Well on my server the registration and top GRB guilds scripts work fine... but other scrips like the login script from ProfNerwosol

PHP Code:
<?php

    $dbhost 
$_ENV['LOCAL_DOMAIN'];
    
$dbuser 'Shaiya';
    
$dbpwd  'Shaiya123';

    
// connect to SQL server
    
if (!$link = @mssql_connect("$dbhost","$dbuser","$dbpwd"))
        {
            print 
"Failed to connect to MSSQL server.";
        };

    
// select database
    
if (!@mssql_select_db("PS_GameData",$link))
        {
            print 
"Failed to select database.";
        };

    
// check who's online
    
$result  = @mssql_query("SELECT LoginStatus, Family FROM Chars WHERE LoginStatus=1",$link);

    
// initialize veriables
    
$online = @mssql_num_rows($result);
    
$human 0;
    
$elf 0;
    
$vail 0;
    
$nordein 0;

    
// fill variables with data (who's online)
    
while($row = @mssql_fetch_array($result,MSSQL_NUM))
      {
          if (@
mssql_num_rows($result)==0) return;
          switch(
$row[1])
             {
                case 
0$human++;break;
                case 
1$elf++;break;
                case 
2$vail++;break;
                case 
3$nordein++;break;
             };
      };


    @
mssql_free_result($result);
    
// Print number of online players
    
print "<table style=\"border: 1px solid black;\">
          <tr><td colspan=2>Players online: </td><td>"
.$online."</td></tr>
          <tr><td>Human: </td><td>"
.$human."</td></tr>
          <tr><td>Elf: </td><td>"
.$elf."</td></tr>
          <tr><td>Vail: </td><td>"
.$vail."</td></tr>
          <tr><td>DeathEater: </td><td>"
.$nordein."</td></tr>
          </table>"
;

    @
mssql_close($link);

?>
it leaves me with a blank page.



also the rank script from Bulgaria.

PHP Code:
<?php
//here you must to replace data with your 
$server 'l127.0.0.1';
$dbuser 'Shaiya';
$dbpass 'Shaiya123';
$count=1;
$rimg=0;
$cimg=0;
$kdr=0;
//joker's remake : variable "$topcount" defined rows (1~N) in the table of top(N) players.
$topcount=100;
//connection with database
$conn mssql_connect($server$dbuser$dbpass)
  or die(
"Couldn't connect to SQL Server on $myServer");
 
$query "SELECT * FROM PS_GameData.dbo.chars ORDER BY k1 desc";

$result mssql_query($query);

echo 
"<html><head><STYLE TYPE=\"text/css\">
<!--
td { background:url(image.png) no-repeat; }
td.i0{ background-position: 0 0; width: 28px; height: 16px; } 
td.i1{ background-position: 0 -26px; width: 28px; height: 16px; } 
td.i2{ background-position: 0 -52px; width: 28px; height: 16px; } 
td.i3{ background-position: 0 -78px; width: 29px; height: 16px; } 
td.i4{ background-position: 0 -104px; width: 29px; height: 15px; } 
td.i5{ background-position: 0 -129px; width: 28px; height: 18px; } 
td.i6{ background-position: 0 -157px; width: 30px; height: 17px; } 
td.i7{ background-position: 0 -184px; width: 29px; height: 17px; } 
td.i8{ background-position: 0 -211px; width: 28px; height: 16px; } 
td.i9{ background-position: 0 -237px; width: 28px; height: 18px; } 
td.i10{ background-position: 0 -265px; width: 29px; height: 18px; } 
td.i11{ background-position: 0 -293px; width: 29px; height: 24px; } 
td.i12{ background-position: 0 -327px; width: 29px; height: 18px; } 
td.i13{ background-position: 0 -355px; width: 29px; height: 18px; } 
td.i14{ background-position: 0 -383px; width: 29px; height: 18px; } 
td.i15{ background-position: 0 -411px; width: 29px; height: 18px; } 
td.i16{ background-position: 0 -439px; width: 29px; height: 18px; } 
td.i17{ background-position: 0 -467px; width: 24px; height: 24px; } 
td.i18{ background-position: 0 -501px; width: 24px; height: 24px; } 
td.i19{ background-position: 0 -535px; width: 24px; height: 24px; } 
td.i20{ background-position: 0 -569px; width: 24px; height: 24px; } 
td.i21{ background-position: 0 -603px; width: 24px; height: 24px; } 
td.i22{ background-position: 0 -637px; width: 24px; height: 24px; } 
</STYLE>
<title>PvP Rankings</title></head>"
;
echo 
"<body><center>
      <table cellspacing=10 cellpadding=0 border=0 bgcolor=\"black\">
      <td style=\"color:#FC9700\" bgcolor=\"black\">Rank</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Name</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Class</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Level</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Kills</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Death</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">KDR</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Rank"
;
      
      

 
//joker's remake : check the end of table  
 
while($count != ($topcount+1))
   {
//joker's remake : get status of the player  
   
$row mssql_fetch_array($result);
   
$status mssql_query(" SELECT UserUID,Status FROM PS_UserData.dbo.Users_Master WHERE UserUID = $row[2]",$conn);  
   
$row1 mssql_fetch_array($status);
 
//joker's remake : check that status=0 ,so eliminate all banned players ,GM,GMA        
       
if($row1[1] == 0)
       {       
         if(
$row[39] >= 200000)
            
$rimg=16;
           else if(
$row[39] >= 150000)
            
$rimg=15;
           else if(
$row[39] >= 130000)
            
$rimg=14;
           else if(
$row[39] >= 110000)
            
$rimg=13;
           else if(
$row[39] >= 90000)
            
$rimg=12;
           else if(
$row[39] >= 70000)
            
$rimg=11;
           else if(
$row[39] >= 50000)
            
$rimg=10;
           else if(
$row[39] >= 40000)
            
$rimg=9;
           else if(
$row[39] >= 30000)
            
$rimg=8;
           else if(
$row[39] >= 20000)
             
$rimg=7;
           else if(
$row[39] >= 10000)
            
$rimg=6;
           else if(
$row[39] >= 5000)
            
$rimg=5;
           else if(
$row[39] >= 1000)
            
$rimg=4;
           else if(
$row[39] >= 300)
            
$rimg=3;
           else if(
$row[39] >= 50)
            
$rimg=2;
           else if(
$row[39] >= 1)
            
$rimg=1;
           else 
            
$rimg=0;
            
    
           
$cimg $row[13]+17;
           if(
$row[40]===0)
            
$kdr=number_format($row[39]/1,3,'.','');
           else
            
$kdr=number_format($row[39]/$row[40],3,'.','');
           echo 
"<tr style=\"color:white\">";
           echo 
"<td>$count</td><td>"$row[4] ."</td><td class=\"i$cimg\"></td><td>"$row[15] ."</td><td>"$row[39] . "</td><td>"$row[40] . "</td><td>".$kdr."</td><td class=\"i$rimg\"></td>";
           echo 
"</tr>";
           
$count++; 
        }         
    }
echo 
"</table>";
echo 
"</html>";

mssql_close($conn);
?>

this one leaves me with this.
Code:
Call to undefined function mssql_fetch_array() in C:\inetpub\wwwroot\rank.php on line 65
I tried to reinstall PHP (wasnt easy) but I got the same error. My guess is tehre is an extension or settings that is off. Anyone have an idea?
09/21/2011 11:46 JPGaming#2
Quote:
Call to undefined function mssql_fetch_array() in C:\inetpub\wwwroot\rank.php on line 65
Mean that your SQL Query don't work.
You do not have to reinstall your PHP, just have a look to your Querys..

Quote:
$row = mssql_fetch_array($result);
$status = mssql_query(" SELECT UserUID,Status FROM PS_UserData.dbo.Users_Master WHERE UserUID = $row[2]",$conn);
Better:
Quote:
$row = mssql_fetch_array($result);
$status = mssql_query("SELECT UserUID,Status FROM PS_UserData.dbo.Users_Master WHERE UserUID = '$row[2]'",$conn);
09/21/2011 13:16 [ADMIN]Cryptic#3
now I get this lol

Fatal error: Call to undefined function mssql_connect() in C:\inetpub\wwwroot\rank.php on line 13

edit:

fixed that by changing the connection to
$conn = odbc_connect("Driver={SQL Server};Server=$server", $dbuser, $dbpass);

since that seem to be the only thing that works for me but now I get this error:


Parse error: syntax error, unexpected ';' in C:\inetpub\wwwroot\rank.php on line 13



that means the error is in this code


$query = "SELECT * FROM PS_GameData.dbo.chars ORDER BY k1 desc";

$result = mssql_query($query);
09/22/2011 03:08 [DEV]xXDASHXx#4
not exactly shure without adding the line to one of my php scripts what is causeing the error as i am no master php coder but here is my PVP rank script fill free to use it if you like just change
---->(include "db_connect.php"; )<------ this section at top of quary to however you code your quarys to conect to your db.

PHP Code:
<?php
include "db_connect.php";
$count=1;
$rank=0;
$cimg=0;
$kdr=0;
$query "SELECT top 25* FROM PS_GameData.dbo.Chars C INNER JOIN PS_UserData.dbo.Users_Master U ON U.UserUID = C.UserUID WHERE U.Status = 0 and C.Del = 0 ORDER BY k1 desc ";
$result mssql_query($query);
echo 
"<html><head><STYLE TYPE=\"text/css\">
<!--
td { background:url(image.png) no-repeat; }
td.i0{ background-position: 0 0; width: 28px; height: 16px; } 
td.i1{ background-position: 0 -26px; width: 28px; height: 16px; } 
td.i2{ background-position: 0 -52px; width: 28px; height: 16px; } 
td.i3{ background-position: 0 -78px; width: 29px; height: 16px; } 
td.i4{ background-position: 0 -104px; width: 29px; height: 15px; } 
td.i5{ background-position: 0 -129px; width: 28px; height: 18px; } 
td.i6{ background-position: 0 -157px; width: 30px; height: 17px; } 
td.i7{ background-position: 0 -184px; width: 29px; height: 17px; } 
td.i8{ background-position: 0 -211px; width: 28px; height: 16px; } 
td.i9{ background-position: 0 -237px; width: 28px; height: 18px; } 
td.i10{ background-position: 0 -265px; width: 29px; height: 18px; } 
td.i11{ background-position: 0 -293px; width: 29px; height: 24px; } 
td.i12{ background-position: 0 -327px; width: 29px; height: 18px; } 
td.i13{ background-position: 0 -355px; width: 29px; height: 18px; } 
td.i14{ background-position: 0 -383px; width: 29px; height: 18px; } 
td.i15{ background-position: 0 -411px; width: 29px; height: 18px; } 
td.i16{ background-position: 0 -439px; width: 29px; height: 18px; } 
td.i17{ background-position: 0 -467px; width: 24px; height: 24px; } 
td.i18{ background-position: 0 -501px; width: 24px; height: 24px; } 
td.i19{ background-position: 0 -535px; width: 24px; height: 24px; } 
td.i20{ background-position: 0 -569px; width: 24px; height: 24px; } 
td.i21{ background-position: 0 -603px; width: 24px; height: 24px; } 
td.i22{ background-position: 0 -637px; width: 24px; height: 24px; } 
</STYLE>
<title>PVP Rankings</title></head><center> <b>Overall PVP Standings</b>"
;
echo 
"<body><center>
      <table cellspacing=10 cellpadding=0 border=0 bgcolor=\"black\">
      <td style=\"color:#FC9700\" bgcolor=\"black\">Overall Rank</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Name</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Level</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Class</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Kills</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Death</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">K/D Ratio</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">PVP Rank"
;
while(
$row mssql_fetch_array($result))
{if(
$row[40] >= 200000)
    
$rank=16;
  else if(
$row[40] >= 150000)
    
$rank=15;
  else if(
$row[40] >= 130000)
    
$rank=14;
  else if(
$row[40] >= 110000)
    
$rank=13;
  else if(
$row[40] >= 90000)
    
$rank=12;
  else if(
$row[40] >= 70000)
    
$rank=11;
  else if(
$row[40] >= 50000)
    
$rank=10;
  else if(
$row[40] >= 40000)
    
$rank=9;
  else if(
$row[40] >= 30000)
    
$rank=8;
  else if(
$row[40] >= 20000)
    
$rank=7;
  else if(
$row[40] >= 10000)
    
$rank=6;
  else if(
$row[40] >= 5000)
    
$rank=5;
  else if(
$row[40] >= 1000)
    
$rank=4;
  else if(
$row[40] >= 300)
    
$rank=3;
  else if(
$row[40] >= 50)
    
$rank=2;
  else if(
$row[40] >= 1)
    
$rank=1;
  else 
    
$rank=0;
if(
$row[41]===0)
    
$kdr=number_format($row[40]/1,3,'.','');
  else
    
$kdr=number_format($row[40]/$row[41],3,'.','');
  echo 
"<tr style=\"color:white\">";
  echo 
" <td> $count</td><td>"$row[4] ."</td><td>"$row[16] ."</td><td>"$row[5] ."</td><td>"$row[40] . "</td><td>"$row[41] . "</td><td>".$kdr."</td><td> $rank</td>";
  echo 
"</tr>";
  
$count++;
}
echo 
"</table>";
echo 
"</html>";

?> 
<p>
<p>
<?php

$count1
=1;
$query "SELECT top 25* FROM PS_GameData.dbo.Chars C INNER JOIN PS_UserData.dbo.Users_Master U ON U.UserUID = C.UserUID WHERE U.Status = 0 and C.Del = 0 and C.Level > 30 ORDER BY k1 desc ";

$result mssql_query($query);

echo 
"<html><head><STYLE TYPE=\"text/css\">
<!--
td { background:url(image.png) no-repeat; }
td.i0{ background-position: 0 0; width: 28px; height: 16px; } 
td.i1{ background-position: 0 -26px; width: 28px; height: 16px; } 
td.i2{ background-position: 0 -52px; width: 28px; height: 16px; } 
td.i3{ background-position: 0 -78px; width: 29px; height: 16px; } 
td.i4{ background-position: 0 -104px; width: 29px; height: 15px; } 
td.i5{ background-position: 0 -129px; width: 28px; height: 18px; } 
td.i6{ background-position: 0 -157px; width: 30px; height: 17px; } 
td.i7{ background-position: 0 -184px; width: 29px; height: 17px; } 
td.i8{ background-position: 0 -211px; width: 28px; height: 16px; } 
td.i9{ background-position: 0 -237px; width: 28px; height: 18px; } 
td.i10{ background-position: 0 -265px; width: 29px; height: 18px; } 
td.i11{ background-position: 0 -293px; width: 29px; height: 24px; } 
td.i12{ background-position: 0 -327px; width: 29px; height: 18px; } 
td.i13{ background-position: 0 -355px; width: 29px; height: 18px; } 
td.i14{ background-position: 0 -383px; width: 29px; height: 18px; } 
td.i15{ background-position: 0 -411px; width: 29px; height: 18px; } 
td.i16{ background-position: 0 -439px; width: 29px; height: 18px; } 
td.i17{ background-position: 0 -467px; width: 24px; height: 24px; } 
td.i18{ background-position: 0 -501px; width: 24px; height: 24px; } 
td.i19{ background-position: 0 -535px; width: 24px; height: 24px; } 
td.i20{ background-position: 0 -569px; width: 24px; height: 24px; } 
td.i21{ background-position: 0 -603px; width: 24px; height: 24px; } 
td.i22{ background-position: 0 -637px; width: 24px; height: 24px; } 
</STYLE>
</head><center> <b>LVL 70 PVP Standings</b>"
;
echo 
"<body><center>
      <table cellspacing=10 cellpadding=0 border=0 bgcolor=\"black\">
      <td style=\"color:#FC9700\" bgcolor=\"black\">Overall Rank</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Name</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Level</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Class</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Kills</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Death</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">K/D Ratio</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">PVP Rank"
;

while(
$row mssql_fetch_array($result))
{    
  if(
$row[40] >= 200000)
    
$rank=16;
  else if(
$row[40] >= 150000)
    
$rank=15;
  else if(
$row[40] >= 130000)
    
$rank=14;
  else if(
$row[40] >= 110000)
    
$rank=13;
  else if(
$row[40] >= 90000)
    
$rank=12;
  else if(
$row[40] >= 70000)
    
$rank=11;
  else if(
$row[40] >= 50000)
    
$rank=10;
  else if(
$row[40] >= 40000)
    
$rank=9;
  else if(
$row[40] >= 30000)
    
$rank=8;
  else if(
$row[40] >= 20000)
    
$rank=7;
  else if(
$row[40] >= 10000)
    
$rank=6;
  else if(
$row[40] >= 5000)
    
$rank=5;
  else if(
$row[40] >= 1000)
    
$rank=4;
  else if(
$row[40] >= 300)
    
$rank=3;
  else if(
$row[40] >= 50)
    
$rank=2;
  else if(
$row[40] >= 1)
    
$rank=1;
  else 
    
$rank=0;
  if(
$row[41]===0)
    
$kdr=number_format($row[40]/1,3,'.','');
  else
    
$kdr=number_format($row[40]/$row[41],3,'.','');
  echo 
"<tr style=\"color:white\">";
  echo 
"<td> $count1 </td><td>"$row[4] ."</td><td>"$row[16] ."</td><td>"$row[5] ."</td><td>"$row[40] . "</td><td>"$row[41] . "</td><td>".$kdr."</td><td> $rank</td>";
  echo 
"</tr>";
  
$count1++;
}
echo 
"</table>";
echo 
"</html>";

?> 
<p>
<p>
<?php
$count2
=1;
$query "SELECT top 25* FROM PS_GameData.dbo.Chars C INNER JOIN PS_UserData.dbo.Users_Master U ON U.UserUID = C.UserUID WHERE U.Status = 0 and C.Del = 0 and C.Level = 30 ORDER BY k1 desc ";

$result mssql_query($query);

echo 
"<html><head><STYLE TYPE=\"text/css\">
<!--
td { background:url(image.png) no-repeat; }
td.i0{ background-position: 0 0; width: 28px; height: 16px; } 
td.i1{ background-position: 0 -26px; width: 28px; height: 16px; } 
td.i2{ background-position: 0 -52px; width: 28px; height: 16px; } 
td.i3{ background-position: 0 -78px; width: 29px; height: 16px; } 
td.i4{ background-position: 0 -104px; width: 29px; height: 15px; } 
td.i5{ background-position: 0 -129px; width: 28px; height: 18px; } 
td.i6{ background-position: 0 -157px; width: 30px; height: 17px; } 
td.i7{ background-position: 0 -184px; width: 29px; height: 17px; } 
td.i8{ background-position: 0 -211px; width: 28px; height: 16px; } 
td.i9{ background-position: 0 -237px; width: 28px; height: 18px; } 
td.i10{ background-position: 0 -265px; width: 29px; height: 18px; } 
td.i11{ background-position: 0 -293px; width: 29px; height: 24px; } 
td.i12{ background-position: 0 -327px; width: 29px; height: 18px; } 
td.i13{ background-position: 0 -355px; width: 29px; height: 18px; } 
td.i14{ background-position: 0 -383px; width: 29px; height: 18px; } 
td.i15{ background-position: 0 -411px; width: 29px; height: 18px; } 
td.i16{ background-position: 0 -439px; width: 29px; height: 18px; } 
td.i17{ background-position: 0 -467px; width: 24px; height: 24px; } 
td.i18{ background-position: 0 -501px; width: 24px; height: 24px; } 
td.i19{ background-position: 0 -535px; width: 24px; height: 24px; } 
td.i20{ background-position: 0 -569px; width: 24px; height: 24px; } 
td.i21{ background-position: 0 -603px; width: 24px; height: 24px; } 
td.i22{ background-position: 0 -637px; width: 24px; height: 24px; } 
</STYLE>
</head><center> <b>Level 30 PVP Standings</b>"
;
echo 
"<body><center>
      <table cellspacing=10 cellpadding=0 border=0 bgcolor=\"black\">
      <td style=\"color:#FC9700\" bgcolor=\"black\">Overall Rank</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Name</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Level</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Class</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Kills</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Death</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">K/D Ratio</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">PVP Rank"
;

while(
$row mssql_fetch_array($result))
{    
  if(
$row[40] >= 200000)
    
$rank=16;
  else if(
$row[40] >= 150000)
    
$rank=15;
  else if(
$row[40] >= 130000)
    
$rank=14;
  else if(
$row[40] >= 110000)
    
$rank=13;
  else if(
$row[40] >= 90000)
    
$rank=12;
  else if(
$row[40] >= 70000)
    
$rank=11;
  else if(
$row[40] >= 50000)
    
$rank=10;
  else if(
$row[40] >= 40000)
    
$rank=9;
  else if(
$row[40] >= 30000)
    
$rank=8;
  else if(
$row[40] >= 20000)
    
$rank=7;
  else if(
$row[40] >= 10000)
    
$rank=6;
  else if(
$row[40] >= 5000)
    
$rank=5;
  else if(
$row[40] >= 1000)
    
$rank=4;
  else if(
$row[40] >= 300)
    
$rank=3;
  else if(
$row[40] >= 50)
    
$rank=2;
  else if(
$row[40] >= 1)
    
$rank=1;
  else 
    
$rank=0;
    
  
  if(
$row[41]===0)
    
$kdr=number_format($row[40]/1,3,'.','');
  else
    
$kdr=number_format($row[40]/$row[41],3,'.','');
  echo 
"<tr style=\"color:white\">";
  echo 
"<td> $count2</td><td>"$row[4] ."</td><td>"$row[16] ."</td><td>"$row[5] ."</td><td>"$row[40] . "</td><td>"$row[41] . "</td><td>".$kdr."</td><td> $rank</td>";
  echo 
"</tr>";
  
$count2++;
}
echo 
"</table>";
echo 
"</html>";

?> 
<p>
<p>
<?php
$count3
=1;
$query "SELECT top 25* FROM PS_GameData.dbo.Chars C INNER JOIN PS_UserData.dbo.Users_Master U ON U.UserUID = C.UserUID WHERE U.Status = 0 and C.Del = 0 and C.Level < 16 ORDER BY k1 desc ";

$result mssql_query($query);

echo 
"<html><head><STYLE TYPE=\"text/css\">
<!--
td { background:url(image.png) no-repeat; }
td.i0{ background-position: 0 0; width: 28px; height: 16px; } 
td.i1{ background-position: 0 -26px; width: 28px; height: 16px; } 
td.i2{ background-position: 0 -52px; width: 28px; height: 16px; } 
td.i3{ background-position: 0 -78px; width: 29px; height: 16px; } 
td.i4{ background-position: 0 -104px; width: 29px; height: 15px; } 
td.i5{ background-position: 0 -129px; width: 28px; height: 18px; } 
td.i6{ background-position: 0 -157px; width: 30px; height: 17px; } 
td.i7{ background-position: 0 -184px; width: 29px; height: 17px; } 
td.i8{ background-position: 0 -211px; width: 28px; height: 16px; } 
td.i9{ background-position: 0 -237px; width: 28px; height: 18px; } 
td.i10{ background-position: 0 -265px; width: 29px; height: 18px; } 
td.i11{ background-position: 0 -293px; width: 29px; height: 24px; } 
td.i12{ background-position: 0 -327px; width: 29px; height: 18px; } 
td.i13{ background-position: 0 -355px; width: 29px; height: 18px; } 
td.i14{ background-position: 0 -383px; width: 29px; height: 18px; } 
td.i15{ background-position: 0 -411px; width: 29px; height: 18px; } 
td.i16{ background-position: 0 -439px; width: 29px; height: 18px; } 
td.i17{ background-position: 0 -467px; width: 24px; height: 24px; } 
td.i18{ background-position: 0 -501px; width: 24px; height: 24px; } 
td.i19{ background-position: 0 -535px; width: 24px; height: 24px; } 
td.i20{ background-position: 0 -569px; width: 24px; height: 24px; } 
td.i21{ background-position: 0 -603px; width: 24px; height: 24px; } 
td.i22{ background-position: 0 -637px; width: 24px; height: 24px; } 
</STYLE>
</head><center> <b> LVL 15 PVP Standings</b>"
;
echo 
"<body><center>
      <table cellspacing=10 cellpadding=0 border=0 bgcolor=\"black\">
      <td style=\"color:#FC9700\" bgcolor=\"black\">Overall Rank</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Name</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Level</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Class</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Kills</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">Death</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">K/D Ratio</td>
      <td style=\"color:#FC9700\" bgcolor=\"black\">PVP Rank"
;

while(
$row mssql_fetch_array($result))
{    
  if(
$row[40] >= 200000)
    
$rank=16;
  else if(
$row[40] >= 150000)
    
$rank=15;
  else if(
$row[40] >= 130000)
    
$rank=14;
  else if(
$row[40] >= 110000)
    
$rank=13;
  else if(
$row[40] >= 90000)
    
$rank=12;
  else if(
$row[40] >= 70000)
    
$rank=11;
  else if(
$row[40] >= 50000)
    
$rank=10;
  else if(
$row[40] >= 40000)
    
$rank=9;
  else if(
$row[40] >= 30000)
    
$rank=8;
  else if(
$row[40] >= 20000)
    
$rank=7;
  else if(
$row[40] >= 10000)
    
$rank=6;
  else if(
$row[40] >= 5000)
    
$rank=5;
  else if(
$row[40] >= 1000)
    
$rank=4;
  else if(
$row[40] >= 300)
    
$rank=3;
  else if(
$row[40] >= 50)
    
$rank=2;
  else if(
$row[40] >= 1)
    
$rank=1;
  else 
    
$rank=0;
    
  
  if(
$row[41]===0)
    
$kdr=number_format($row[40]/1,3,'.','');
  else
    
$kdr=number_format($row[40]/$row[41],3,'.','');
  echo 
"<tr style=\"color:white\">";
  echo 
"<td> $count3</td><td>"$row[4] ."</td><td>"$row[16] ."</td><td>"$row[5] ."</td><td>"$row[40] . "</td><td>"$row[41] . "</td><td>".$kdr."</td><td> $rank</td>";
  echo 
"</tr>";
  
$count3++;
}
echo 
"</table>";
echo 
"</html>";

?>
this one actyaly calls 4 difrent sets of ranks 1 for overall 1 for lvl 70 1 for lvl 30 and 1 for lvl 15 and displaye all in sepret sets on the page
09/22/2011 11:42 [ADMIN]Cryptic#5
Found out it was an extension error but its not fixed yet... might have to reboot the server then it needs to wait for next maint/update. I didnt have the mssql.dll extension.

I am using IIS7