i created a page which is supposed to display a number of database records, 3 at a time from my mysql database. to do this i have more.php (code) and more.tpl.php (html template) file. on the page going into more.php i am sending (using httpd get) a $pastcount variable with a value of "3".
relevant more.php code
<?php
$tpl = new tpl("more");
$dat = Array();
$fnd = 0;
$pastcount = $_GET['pastcount'];
$rcount=$pastcount+3;
$res = mysql_query("select * from ratings order by tm desc limit $rcount,3");
relevant more.tpl.php code
<form method="get" action="/more.php">
<div align="center">
<input name="pastcount" type="hidden" value="<?$pastcount;?>">
<input value="Next 3 Reviews" type="submit"></div>
the problem is that the template file does not echo the variable, so it does not work. any idea why the variable is not echoing and how i can get it to?