I am developing Customer Management Database using MYSQL and PHP. I got one problem. I want to display all customers by limiting the number of Customers per screen to be 10. I can see the first 10 rows. When I click on Next button nothing will happen. here is my script. I have showallcustomer button in my form.
if(isset($showallcustomer))
{
if(empty($from)) $from = 0;
if(empty($size)) $size = 2;
connection($connect, $database);
$query = mysql_query("select from customer") or die(mysql_error());
$count = mysql_num_rows($query);
$queryresult = mysql_query("select from customer limit $from, $size")
or die(mysql_error());
$series = $from;
print "<h3 align=center><a href = 'customerprint.php'>Printable Version </a></h3>";
createtable($queryresult, $series);
print "<table align = center><tr>";
if($from > 0) print('<td><a href="customer.php?from='.max(($from-$size), 0).'&size='.$size.'"><img src=left.gif alt = Previous></a></td>');
print "<td> </td>";
if(($from+$size) < $count) print('<td><a href="customer.php?from='.($from+$size).'&size='.$size.'"><img src = right.gif alt=Next></a></td>');
print "</tr></table>";
}