I know this has been covered in quite a few instances but as I am only starting to learn mysql quite a bit is confusing to me, direct help would be appreciated. I have got a display page working showing the data from the database. My problem is that I want to show these registration detail tables in 3/4 columns and rows per page but haven't the first idea of how to do page pagination. I would like to be able to go through page after page as well.
I have put my code below and please ignore the fact that I may have been able to do it better in a different way, as I said earlier I am only learning to crawl.
<html>
<head>
</head>
<body>
<?php
$username="xxxxxxxxxxxxxxxxxxxxxx";
$password="xxxxxxxxxxxxxxx";
$database="xxxxxxxxxxxxxxxxxxxxxx";
$hostname = xxxxxxxxxxxxxxxxxxxxxxxxxx;
mysql_connect($hostname,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM playerreg";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
?>
<?php
$i=0;
while ($i < $num) {
$f1=mysql_result($result,$i,"cf_id");
$f2=mysql_result($result,$i,"text_1");
$f3=mysql_result($result,$i,"text_4");
$f4=mysql_result($result,$i,"date_6");
$f5=mysql_result($result,$i,"file_10");
$f6=mysql_result($result,$i,"select_11");
$f7=mysql_result($result,$i,"text_7");
$f8=mysql_result($result,$i,"select_3");
?>
<table style="width: 260px" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 260px">
<table style="width: 260px; float: left;" align="left" cellspacing="0" cellpadding="0" class="style8">
<tr>
<td style="width: 260px" class="style4" valign="top">
<table style="width: 300px; float: left;" class="style2" cellspacing="0" cellpadding="0">
<tr>
<td colspan="5" style="height: 3px"></td>
</tr>
<tr>
<td colspan="5" class="style3" style="height: 12px"><strong>REGISTRATION</strong></td>
</tr>
<tr>
<td colspan="5" style="height: 3px"></td>
</tr>
<tr>
<td style="width: 5px" rowspan="6" class="style4"> </td>
<td rowspan="6" class="style4">
<img alt="" src="images/PlayerReg/<?php echo $f5; ?>" width="120" height="120"></td>
<td rowspan="6" class="style4"></td>
<td style="width: 150px" class="style10"><font face="Arial, Helvetica, sans-serif">
<strong><?php echo $f3; ?></strong></font></td>
<td rowspan="6" style="width: 5px" class="style4"> </td>
</tr>
<tr>
<td style="width: 150px; height: 3px;" class="style10"></td>
</tr>
<tr>
<td style="width: 150px" class="style10">
<span class="style7">Squad No<br></span>
<strong><?php echo $f7; ?></strong></td>
</tr>
<tr>
<td style="width: 150px" class="style5">
<span class="style12">DOB</span><strong><span class="style11"><br>
</span>
<?php echo $f4; ?></strong></td>
</tr>
<tr>
<td valign="bottom" class="style13" style="width: 150px">ID No</td>
</tr>
<tr>
<td valign="top" class="style5" style="width: 150px">
<strong>U10-</strong><font face="Arial, Helvetica, sans-serif"><strong><?php echo $f1; ?> </strong></font></td>
</tr>
<tr>
<td colspan="5" style="height: 3px"></td>
</tr>
<tr>
<td colspan="5" class="style6"><strong><span class="style11"><?php echo $f2; ?></span> <span class="style11"><?php echo $f8; ?></span></strong></td>
</tr>
<tr>
<td colspan="5" style="height: 3px"></td>
</tr>
</table>
<?php
$i++;
}
?></td>
</tr>
</table>
<body>
<html>