This page isn’t working *********.com is currently unable to handle this request. HTTP ERROR 500
<?php
include 'includes/config.php';
include 'includes/header.php';
checkForLogin();
if(!isset($_GET['id']))
{
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=../pages/index.php">';
exit;
}
$charaID = $_GET['id'];
$sesuID = $_SESSION['uID'];
$query = $con->prepare("SELECT * from players where reg_id = '$charaID'");
$query->execute();
$gData = $query->fetch();
if($gData['reg_id'] != $sesuID)
{
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=../pages/index.php">';
exit;
}
?>
<div class="row">
<div class="col-md-12">
<h1 class="page-header">
<?php echo $gData['name']; ?>
</h1>
</div>
</div>
<div class="row">
<div class="col-lg-2">
<img src="../skins/Skin_<?php echo $gData['saveskin']; ?>.png" style="height:300px;">
</div>
<div class="col-lg-8">
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-lg-6">
Status: <?php if($gData['active'] == 1)
{
echo '<span style="color:#00FF00";>ONLINE</span>'
}
else
{
echo '<span style="color:#FF0000";>OFFLINE</span>'
} ?>
<hr />
Playing Time: <?php echo($gData['hours']); ?> Hours, <?php echo($gData['minutes']); ?> Minutes and <?php echo($gData['seconds']); ?> Seconds
<hr />
Premium: <?php if($gData['premium'] == 1)
{
echo '<span style="color:#00FF00";>PREMIUM</span>'
}
else if($gData['premium'] == 2)
{
echo '<span style="color:#00FF00";>PREMIUM 2</span>'
}
else if($gData['premium'] == 3)
{
echo '<span style="color:#00FF00";>VIP</span>'
}
else if($gData['premium'] == 0)
{
echo '<span style="color:#FF0000";>NO</span>'
} ?>
<hr />
Helper: <?php if($gData['helper'] == 1)
{
echo '<span style="color:#00FF00";>HELPER</span>'
}
else if($gData['helper'] == 2)
{
echo '<span style="color:#00FF00";>MAPPER</span>'
}
else if($gData['helper'] == 3)
{
echo '<span style="color:#00FF00";>DEVELOPER</span>'
}
else if($gData['helper'] == 0)
{
echo '<span style="color:#FF0000";>NO</span>'
} ?>
<hr />
Admin: <?php if($gData['adminlevel'] == 1)
{
echo '<span style="color:#00FF00";>MODERATOR</span>'
}
else if($gData['adminlevel'] == 2)
{
echo '<span style="color:#00FF00";>ADMIN</span>'
}
else if($gData['adminlevel'] == 3)
{
echo '<span style="color:#00FF00";>SENIOR ADMIN</span>'
}
else if($gData['adminlevel'] == 4)
{
echo '<span style="color:#00FF00";>HEAD ADMIN</span>'
}
else if($gData['adminlevel'] == 5)
{
echo '<span style="color:#00FF00";>SERVER OWNER</span>'
}
else if($gData['adminlevel'] == 0)
{
echo '<span style="color:#FF0000";>NO</span>'
} ?>
<hr />
Score: <?php echo number_format($gData['score']); ?>
<hr />
Cookies: <?php echo number_format($gData['cookies']); ?>
<hr />
Money: $<?php echo number_format($gData['money']); ?>
<hr />
Bank Money: $<?php echo number_format($gData['bmoney']); ?>
<hr />
Total Money: $<?php echo number_format($gData['money'] + $gData['bmoney']); ?>
<hr />
Group ID: <?php echo number_format($gData['group_id']); ?>
<hr />
Group Rank: <?php echo number_format($gData['group_rank']); ?>
<hr />
Member since: <?php echo $gData['reg_time']); ?>
<hr />
Last login: <?php echo $gData['last_time']); ?>
<hr />
Kills: <?php echo number_format($gData['kills']); ?>
<hr />
Deaths: <?php echo number_format($gData['deaths']); ?>
<hr />
Kill/Death Ratio: <?php echo number_format($gData['kills'] / $gData['kills']); ?>
<hr />
House ID: <?php echo number_format($gData['house_id']); ?>
<hr />
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include 'includes/footer.php';
?>
|
Check the error log for the webserver.
Also that's not how you do prepared queries. You're not supposed to do string concatenation. Read up on how that actually works because right now it's still very vulnerable to SQL injection. I also do redirects with a location header (PHP header() function). The W3C discourages using meta refresh for redirects because it messes up browsers' back buttons. |
|
The only way you are going to learn is to fix it yourself. Stop being lazy.
|
|
Some people actually learn from getting help from the internet as well so get off your high horse. There's no 'one way' to learn something.
|
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=../pages/index.php">';
....where reg_id = '$charaID'"); //This
|
Some people actually learn from getting help from the internet as well so get off your high horse. There's no 'one way' to learn something.
|
|
He asked him to fix the code and post the fixed code to this Thread. Can you not read? I said try to fix it yourself, for example googling solutions. Don't blatantly ask for the answer.
So get of your high horse BR3TT. |