Hi, I am showing my output using this.
It shows all the records on web page where month is July(07)
But I want it show all the records like: there are 29 records found, I also need 3 records per page, How I will do paging for these. please guide me.
<?php
$con = mysql_connect("localhost","root","root");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$a= $_POST["a"];
mysql_select_db("onm", $con);
$result = mysql_query("SELECT * FROM leaseentry WHERE LAPeriodEnd like '%-07-%'");
while($row = mysql_fetch_array($result))
{
echo "<table cellpadding=2 cellspacing=2 width=100%>
<tr>
</tr>";
echo "<tr>";
echo "<th bgcolor=#FFCC00 width=300px>SiteID</th>";
echo "<td bgcolor=#FEE9A9>" . $row['SiteId'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=#FFCC00>Owner Name</th>";
echo "<td bgcolor=#FEE9A9>" . $row['OwnerName'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=#FFCC00>Lease Agreement</th>";
echo "<td bgcolor=#9BCB5D><a href=".$row['LA'].">".$row['ch']."</a></td>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=#FFCC00>LA Start Date</th>";
echo "<td bgcolor=#FEE9A9>" .date("j-F-Y",strtotime($row['LAPeriodStart'])). "</td>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=#FFCC00>LA End Date</th>";
echo "<td bgcolor=#FEE9A9>" .date("j-F-Y",strtotime($row['LAPeriodEnd'])). "</td>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=#FFCC00>Purchase Order</th>";
echo "<td bgcolor=#CB9B5D><a href=".$row['PO'].">".$row['ch']."</a></td>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=#FFCC00>PO Start Date/th>";
echo "<td bgcolor=#FEE9A9>" .date("j-F-Y",strtotime($row['POStartDate'])). "</td>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=#FFCC00>PO End Date</th>";
echo "<td bgcolor=#FEE9A9>" .date("j-F-Y",strtotime($row['POEndDate'])) . "</td>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=#FFCC00>SPA</th>";
echo "<td bgcolor=#CB9B5D><a href=".$row['SPA'].">".$row['SPA']."</a></td>";
echo "</tr>";
$b =$row['SiteId'];
}
echo "</table>";
mysql_close($con);
?>