ive already search in google and yahoo but i don't know how to add that code to my code.
here's my code in displaying a data in the table
$result = mysql_query("SELECT * FROM rent where status = 'pending' order by cno asc");
$count = mysql_num_rows($result);
<table border='1' cellspacing='0' width='612'>
<tr>
<th colspan='8' bgcolor="#000000"><font color='#00FF00'>PENDING REQUEST</font></th>
</tr>
<tr>
<th bgcolor='green'><font color='white'>
<input type='checkbox' name='checkall' onclick='checkedAll();' />
</font></th>
<th bgcolor='green'><font color="white">ID</font></th>
<th bgcolor='green'><font color='white'>Book Date</font></th>
<th bgcolor='green'><font color='white'>Check In</font></th>
<th bgcolor='green'><font color='white'>Check Out</font></th>
<th bgcolor='green'><font color='white'>Name</font></th>
<th bgcolor='green'><font color='white'>View</font></th>
<th bgcolor='green'><font color='white'>Approve</font></th>
</tr>
<?php
$i = 0;
$number = 0;
while($row = mysql_fetch_array($result)){
$number++;
?>
<?php
$i++;
if($i%2)
{
$bg_color = "#EEEEEE";
}
else {
$bg_color = "#E0E0E0";
}
?>
<script language='JavaScript'>
checked = false;
function checkedAll () {
if (checked == false){checked = true}else{checked = false}
for (var i = 0; i < document.getElementById('form1').elements.length; i++) {
document.getElementById('form1').elements[i].checked = checked;
}
}
</script>
<tr bgcolor='". $bg_color ."'>
<td><center>
<strong><font color='red'>
</font></strong>
<input type="checkbox" name="del[]" id="del" value="<?php echo $row['cno']; ?>"></center></td>
<td><center>
<strong><font color='red'><?php echo $row['cno']; ?></font></strong>
</center></td>
<td><center>
<strong><?php echo $row['date']; ?></strong>
</center></td>
<td><center>
<strong><?php echo $row['checkin']; ?></strong>
</center></td>
<td><center>
<strong><?php echo $row['checkout']; ?></strong>
</center></td>
<td><center><?php $result1 = mysql_query("Select * from guest where code='$row[cno]'");
$rows = mysql_fetch_array($result1); ?>
<strong><font color='blue'><strong><font color='blue'><?php echo $rows['lname'] .', '. $rows['fname'] ?></font></strong></font></strong>
</center></td>
<td><center><strong><a href='edit.php?code=<?php echo $row[cno]; ?>' class="style6">View</a></strong>
</center></td>
<td><center><Strong><a href='approve.php?id=<?php echo $row['cno']; ?>' class="style6">Approve</a></Strong>
</center></td>
</tr>
<?php } ?>
</table>
i want to show 10 per pages only can anyone help me please?