I am using the following code
require 'Smarty/libs/Smarty.class.php';
$smarty = new Smarty;
$sel=mysql_query("select id, name from form");
$smarty->assign('contact', $db->getRow($sql));
$smarty->display('testfunction.tpl');
I am getting error:
Fatal error: Call to a member function getRow() on a non-object in D:\xampp\htdocs\smarty\testfun.php on line 21
You haven’t declared any $db object.
Use this instead: