PHP + MySQLのページングについて質問です。
現在このようにしていますが、$tcnt(総件数)をユーザーが変更できるようにするには
どこをどう変えたら良いでしょうか?

$PAGESIZE = 10; #1ページに表示する件数

$page = $_GET["page"]; # 現在のページ
$tcnt = $_GET["tcnt"]; # 総件数
if (!isset($page)) {
$sql = "select count(*) as cnt from ○○";
$rst = mysql_query($sql, $con);
$col = mysql_fetch_array($rst);
mysql_free_result($rst);
$tcnt = $col["cnt"];
$page = 1;
}
$totalpage = ceil($tcnt / $PAGESIZE); #総ページ数

$sql = "select * from ○○ limit " . $PAGESIZE * ($page - 1) . ", $PAGESIZE";