Hallo!
Let me ask you this question for the second time.
I am developing Customer Service Management Database using MYSQL and PHP. I have a problem of displaying results page by page. I can see the first 10 rows. when I click on NEXT button, I see nothing but blank window.
I have a submit button called showallcustomer.
Now the code looks like as follows:
if(isset($showallcustomer))
{
if(empty($from)) $from = 0;
if(empty($size)) $size = 10;
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());
print "<h3 align=center><a href = 'customerprint.php'>Printable Version </a></h3>";
createtable($queryresult);
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>";
}
Note: connection() and createtable() are user defined functions.
When I use: if(isset($showallcustomer) or isset($from)), it works. Is it the correct way of implementing it.
Thank you in advance
Solomon