|
Programmer
Join Date: Nov 2005
Location: Belfast
Posts: 34
Rep Power: 0 
|
Re: PHP Dump issue.
Sorry for the hassle so far guys hehe. The code I just started using is taken from the main page of the Gaming Guild, however even when I simply put the PHP into a php file and uploaded it, it still showed the same problem. Full code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<Title>Honourbound - Raid Points Status</Title>
<meta name="description" content="Honourbound, a World of Warcraft guild on Outland EU Realm" />
<meta name="keywords" content="Honourbound, honourbound, world of warcraft, wow, WoW, Outland, outland" />
<meta name="Generator" content="Joomla! - Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved." />
<meta name="robots" content="index, follow" />
<link rel="shortcut icon" href="http://www.honourbound.net/images/favicon.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="shortcut icon" href="http://www.honourbound.net/images/favicon.ico" />
<link href="http://www.honourbound.net/templates/rt_replicant/css/rokmoomenu.css" rel="stylesheet" type="text/css" />
<link href="http://www.honourbound.net/templates/rt_replicant/css/template_css.css" rel="stylesheet" type="text/css" />
<link href="http://www.honourbound.net/templates/rt_replicant/css/header-dark-red.css" rel="stylesheet" type="text/css" />
<link href="http://www.honourbound.net/templates/rt_replicant/css/rokslidestrip.css" rel="stylesheet" type="text/css" />
<link href="http://www.honourbound.net/templates/rt_replicant/rokzoom/rokzoom.css" rel="stylesheet" type="text/css" />
<!--[if lte IE 6]>
<link href="http://www.honourbound.net/templates/rt_replicant/css/template_ie6.css" rel="stylesheet" type="text/css" />
<style type="text/css">
img { behavior: url(http://www.honourbound.net/templates/rt_replicant/css/iepngfix.htc); }
</style>
<![endif]-->
<style type="text/css">
body {color: #fff;background: #000000 url(http://www.honourbound.net/templates/rt_replicant/images/bg/NewHBbackground.jpg) 50% 0 no-repeat fixed;}
a { color: #fc0 }
.moduletable h3, #horiz-menu, ul#rokslide-toolbar { color: #fff; }
#horiz-menu a, h3.toggler { color: #fc0; }
.sections td,#showcase,#mainframe td#left,#mainframe td#right,#mainframe #user1,#mainframe #page,pre {border: 1px solid #364148;}
#shadow-bottom .padding { border-top: 1px solid #364148;}
.style1
{
width: 100%;
height: 6%;
}
.style2
{
height: 52px;
}
.style3
{
height: 52px;
text-align: center;
}
</style>
<script type="text/javascript" src="http://www.honourbound.net/templates/rt_replicant/js/mootools.js"></script>
<script type="text/javascript" src="http://www.honourbound.net/templates/rt_replicant/rokzoom/rokzoom.js"></script>
<script type="text/javascript" src="http://www.honourbound.net/templates/rt_replicant/js/mootools.bgiframe.js"></script>
<script type="text/javascript" src="http://www.honourbound.net/templates/rt_replicant/js/rokmoomenu.js"></script>
<script type="text/javascript">
window.addEvent('domready', function() {
new Rokmoomenu($E('ul.nav'), {
bgiframe: false,
delay: 500,
animate: {
props: ['opacity', 'width', 'height'],
opts: {
duration:400,
fps: 100,
transition: Fx.Transitions.Cubic.easeOut
}
}
});
});
</script>
<script type="text/javascript">
window.addEvent('load', function() {
RokZoom.init({
imageDir: 'templates/rt_replicant/rokzoom/images/',
resizeFX: {
duration: 500,
transition: Fx.Transitions.Circ.easeOut,
wait: false
}
});
});
</script>
</head>
<body id="smoke">
<div class="surround">
<div class="wrapper">
<div id="shadow-top"></div>
<div id="shadow-middle" style="text-align: center">
<div class="padding">
<table class="style1" border="1">
<tr><td width="120" valign="top" class="style3"><u><b style="text-align: center">Player</b></u><br></td>
<td align="center" valign="top" class="style2"><u><b>Points Spent</b></u><br></td>
<td valign="top" class="style3"><u><b>Points Earned</b></u><br></td>
<td valign="top" class="style3"><u><b>Current Balance</b></u><br></td></tr>
<?php
$conn = mysql_connect("localhost", "<Edited to hide the username>", "<Edited to hide the password");
if (!$conn) {
echo "Unable to connect to DB: " . mysql_error();
exit;
}
if (!mysql_select_db("honourbo_raidpoints")) {
echo "Unable to select honourbo_raidpoints: " . mysql_error();
exit;
}
$sql = "SELECT raiders as raiders, spent , earned, balance
FROM raidpoints";
$result = mysql_query($sql);
if (!$result) {
echo "Could not successfully run query ($sql) from DB: " . mysql_error();
exit;
}
if (mysql_num_rows($result) == 0) {
echo "No rows found, nothing to print so am exiting";
exit;
}
while ($row = mysql_fetch_assoc($result)) {
echo '<tr><td width="120" align="center" valign="top">';
echo $row["raiders"];
echo '</td>';
echo '<td width="120" align="center" valign="top">';
echo $row["spent"];
echo '</td>';
echo '<td width="120" align="center" valign="top">';
echo $row["earned"];
echo '</td>';
echo '<td width="120" align="center" valign="top">';
echo $row["balance"];
echo '</td></tr><br>';
}
?>
</tr>
</table>
</div>
<a href="http://www.honourbound.net" class="nounder">
<div id="pathway"><span id="logo"></span></a>
</div>
<td id="middle">
<div id="page">
</div>
</div>
<div id="shadow-bottom">
<div class="padding">
</div>
</div>
<div id="shadow-rocket"><a href="http://www.rockettheme.com/" title="RocketTheme Joomla Template Club" class="nounder"><img src="http://www.honourbound.net/templates/rt_replicant/images/blank.gif" alt="RocketTheme Joomla Templates" id="rocket" /></a></div>
</div>
</div>
<div id="fgimage"></div>
<div id="bgimage"></div>
</body>
</html><!-- 1205653478 -->
|