I've been working on adding new stuff and changing stuff for my gaming website
The code below works 100% there is actually nothing wrong with it.. however.. I'm tryin' to put spaces between the tables after each post so it looks more organized.
<?php
$dbhost = "localhost";
$dbuser = "*********";
$dbpass = "*********";
$dbname = "dnmeguil_betadnme";
$table = "dnme_news";
mysql_connect($dbhost,$dbuser,$dbpass);
@mysql_select_db($dbname) or die( "Unable to select database");
$query="SELECT * FROM $table ORDER BY id desc";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
if ($num>5) {
$to=5;
}else{
$to=$num;
}
$i=0;
while ($i < $to) {
$poster=mysql_result($result, $i,"poster");
$news=mysql_result($result, $i, "news");
$time=mysql_result($result, $i, "time");
$category=mysql_result($result, $i, "category");
$title=mysql_result($result, $i, "title");
print "<table width='100%' border='1' cellpadding='0' cellspacing='0' bordercolor='#000000'>
<tr>
<td><table width='100%' border='0' align='left' cellpadding='1' cellspacing='1'>
<tr bordercolor='#000000'>
<td><div align='left'><p class='bigletter'>$category $title</b><b></p></div></td>
</tr>
<tr>
<td><div align='left'><p class='smalltext'>Posted by $poster on </b><b>$time</b></p></td>
</tr>
<tr>
<td><div align='left'>$news<br><br></td>
</tr>
</table></td>
</tr>";
#print "<b><p class='bigletter'>$category $title</b><b></p><p class='smalltext'>Posted by $poster on </b><b>$time</b></p><br><br>$news<br><br><center><hr></center>";
$i++;
}
print "</table><br><br>"
?>
As of right now this code is only displaying the latest 5 posts which is fine for what I need.. But I want to put some space between the ables after each post.. I've tired BR and P and won't even put it down 1 line at all.
Here is what it looks like with what I got going on right now
http://beta.dnmeguild.com/index.php
I know most likely it's something simple but who knows.. Aslo the
print "</table><br><br>" i know there should be a ; there but with it there I get an error.. no idea why though.
TIA