<?php
include 'header.php';
echo "<br /><br />";
$achievements = mysql_query("SELECT * FROM `achievements` ORDER BY `id` ASC");
$count = mysql_num_rows($achievements);
echo "<table width='100%' align='center'><tr>
<th width='25%' class='contenthead'>Image</th>
<th width='50%' class='contenthead'>Text</th>
<th width='25%' class='contenthead'>Completed</th>
</tr>";
while($r = mysql_fetch_assoc($achievements))
{
$query = '';
$query = mysql_query("SELECT * FROM `achievement` WHERE `a_id` = {$r['id']} AND `u_id` = ".mysql_real_escape_string($_SESSION['id']));
if(mysql_num_rows($query) == 1) { $complete = '<font color="green">Finished</font>'; }else { $complete = '<font color="red">No</font>'; }
$r['text'] = str_replace('[value]', number_format($r['value']), $r['text']);
echo "<tr>
<td class='contentcontent' align='center'><img src='".$r['image']."' /></td>
<td class='contentcontent' align='center'>".$r['text']."</td>
<td class='contentcontent' align='center'>".$complete."</td>
</tr>";
}
echo "</table><br /><br />";
include 'footer.php';
?>
A little help/knowledge requested.
Anyone know how to make this achievement page display 6 awards at a time. Then a user click next or back to see the next awards.