
Randy Ahn - 2006-08-28 21:53:21
Hey first post -- am I the only one who can't make this class work :( oh,well. Any assistance is appreciated if anyone is monitoring this. Here's my simple code: What am I doing wrong?? Thx
include 'class.paginate.php';
$page = $_REQUEST['pagetest.php'] ? $_REQUEST['pagetest.php'] : 1;
$maxRows = "5";
$from = ($page - 1) * $maxRows;
mysql_connect("localhost", "user", "pass") or die(mysql_error());
mysql_select_db("myDB") or die(mysql_error());
$sql = 'SELECT * FROM `agencies` LIMIT '. $from.', '.$maxRows;
$result = mysql_query($sql) or die(mysql_error());
$totalResult = mysql_num_rows($result);
$path = "http://myPath/pagetest.php?sortBy={$_REQUEST['$name1']}&";
while($row = mysql_fetch_array($result))
{
$name1 = $row['Name1'];
echo $name1. '<br />';
}
$paginate = paginate($page,$totalResult,$_REQUEST['act'],$path);
$paginate['PAGINATE'];
/*Outputs:"Fatal error: Call to undefined function: paginate() in /path/pagetest.php"
*/