Hello, I'm a total newb to PHP and am just clueless here. I'm just trying to show all the data in a table but i'm getting some errors with my current code i'm getting "No Database Selected" and before a warning saying that something was wrong with my while statement.
How should this been written properly?
<?php
$link = mysql_connect('localhost', 'oakshion_user', '*****', 'oakshion_firedata')
or die("Unable to connect to MySQL");
$sql = "SELECT * FROM `firechips_DKP`";
$resault = mysql_query($sql) or die(mysql_error());
echo "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"themes/FireChips/style/style.css\" />";
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#000000\">";
echo "<td>";
echo "<div class=\"border\" bgcolor=\"#000000\" style=\"width: 100%; margin: 0 auto;\">";
echo " <div class=\"im1\">";
echo " <div class=\"im2\">";
echo " <div class=\"im3\">";
echo " <div class=\"im4\">";
echo " <div class=\"im5\">";
echo " <div class=\"im6\">";
echo " <div class=\"im7\">";
echo " <div class=\"im8\">";
echo " <div class=\"tcg\">";
echo " <p> </p>";
echo " <p> </p>";
echo " <table width=\"100%\">";
echo " <tr>";
echo " <td width=\"6%\">";
echo " </td>";
echo " <td>";
echo " <table width=\"100%\">";
echo " <tr>";
echo " <td>";
echo " <table width=\"100%\">";
echo " <tr>";
echo " <td><div>USERNAME</div></td>";
echo " <td><div>GROUP</div></td>";
echo " <td><div>GUILD MEMBER</div></td>";
echo " <td><div>CURRENT DKP</div></td>";
echo " <td><div>TOTAL DKP</div></td>";
echo " <td><div>DOWNED BOSSES</div></td>";
echo " <td><div>LAST RAID</div></td>";
echo " </tr>";
echo " <tr>";
while($row = mysql_fetch_array($result))
{
echo "<td><div>".$row['raidMember']."</div></td><td><div>".$row['groupNumber']."</div></td><td><div>".$row['guildMember']."</div></td><td><div>".$row['currentDKP']."</div></td><td><div>".$row['totalDKP']."</div></td><td><div>".$row['downedBosses']."</div></td><td><div>".$row['lastRaid']."</div></td>";
}
echo " </tr>";
echo " </table>";
echo " </td>";
echo " </tr>";
echo " </table>";
echo " </td>";
echo " <td width=\"6%\">";
echo " </td>";
echo " </tr>";
echo " </table>";
echo " <p> </p>";
echo " <p> </p>";
echo " </div>";
echo " </div>";
echo " </div>";
echo " </div>";
echo " </div>";
echo " </div>";
echo " </div>";
echo " </div>";
echo " </div>";
echo "</div>";
echo "</td>";
echo "</table>";
?>