PHP Classes

Fatal error:

Recommend this page to a friend!

      Paginate  >  All threads  >  Fatal error:  >  (Un) Subscribe thread alerts  
Subject:Fatal error:
Summary:Need help with args and syntax
Messages:2
Author:Randy Ahn
Date:2006-08-28 21:53:21
Update:2006-09-01 22:34:30
 

  1. Fatal error:   Reply   Report abuse  
Picture of Randy Ahn 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"
*/

  2. Re: Fatal error:   Reply   Report abuse  
Picture of Randy Ahn Randy Ahn - 2006-09-01 22:34:30 - In reply to message 1 from Randy Ahn
nevermind -- switched to paginateIT.