i have my website up and in top legions, players, families the staff do not show but in top pets they do it is supposed to be set to where the staffs pets dont show but it's not working can anyone tell me how to fix it or upload a toppets.php that doesn't show them please, as i dont think it is fair to my players.
this is what my top pets.php looks like.
<?php
include('definitions.php');
?>
<h2><span></span></h2>
<br /><br />
<center><div align="center">
<form action='index.php?id=pets' method=POST>
Pet Type
<select name="type" onChange="this.form.submit()">
<option value="top10">Please choose a catagory</option>
<?php
$pKeys = array_keys($eudemon);
foreach ($pKeys as $pId) {
$pSelected = "";
if ($pId == $_POST['type']) { $pSelected = "selected"; };
echo "<option value='" . $pId . "'" . $pSelected . ">" . $eudemon[$pId] . "</option>";
}
unset($pId);
?>
</select>
</font>
</form>
</div>
<br><p>
<head>
</font><span class="style2">
<table width="217" height="137" border="0">
<tr>
<td>Rank</td>
<td>Owner</td>
<td>Name</td>
<td>Type</td>
<td>Level</td>
<td>Stars</td>
<td>Reborns</td>
</tr>
<?php
$pId = $_POST['type'];
$pId = $pId[0] . $pId[1];
switch($pId) {
case "top10":
$sQuery = mysql_query("SELECT * FROM cq_eudemon WHERE (`ori_owner_name` NOT LIKE '%[PM]%' AND `ori_owner_name` NOT LIKE '%[GM]%' ORDER BY star_lev DESC LIMIT 25");
default:
$sQuery = mysql_query("SELECT * FROM cq_eudemon WHERE (`ori_owner_name` NOT LIKE '%[PM]%' AND `ori_owner_name` NOT LIKE '%[GM]%' AND `item_type` LIKE '1071$pId%' OR `item_type` LIKE '1079$pId%' OR `item_type` LIKE '1081$pId%') ORDER BY star_lev DESC LIMIT 25");
}
$rank = 1;
while ($pet = mysql_fetch_assoc($sQuery)) {
$star_lev = $pet['star_lev'];
$stars = "";
$item_type = $pet['item_type'];
$type = "";
if (strlen($star_lev) == 4) {
$stars = $star_lev[0] . $star_lev[1];
} else if (strlen($star_lev) == 5) {
$stars = $star_lev[0] . $star_lev[1] . $star_lev[2];
} else {
$stars = 0;
}
$type = $eudemon[$item_type[strlen($item_type)-3] . $item_type[strlen($item_type)-2] . "0"];
$sql = "SELECT * FROM cq_user WHERE id='".$pet['player_id']."'";
$query = mysql_query($sql) or die(mysql_error());
$row1 = mysql_fetch_object($query);
$curowner = htmlspecialchars($row1->name);
echo "<tr>";
echo "<td>" . $rank . "</td>";
echo "<td>" . $curowner . "</td>";
echo "<td>" . $pet['name'] . "</td>";
echo "<td>" . $type . "</td>";
echo "<td>" . $pet['level'] . "</td>";
echo "<td>" . $stars . "</td>";
echo "<td>" . $pet['reborn_times'] . "</td>";
echo "</tr>";
$rank++;
}
?>
</table>
ty all in advance






