i am getting problem in smarty
case:
wwwroot/mySite/admin has files like
/templates/ folder has-index.php
-listA.php
-listB.php
index.php contains-header.tpl
-footer.tpl
-index.tpl
-listA.tpl
-listB.tpl
Code: Select all
<?php
//in upper section it includes all the class files and creates the respective objects
// neccessary processing goes here...
$smarty->display("index.tpl");
?>Code: Select all
{php}
if(isset($_GET['action']))
{
$filename = $_GET['action'].".php";
if(file_exists($filename))
{
include "$filename";
}
else
{
//error
}
{/php}suppose i clicked on the link ?action=listA then it auto includes the page listA.php which then display the array data in listA.tpl
problem:
It was working in normal case ie without using smarty but Now whenever i clik on the links
it shows:
i am not getting the solution please help.Call to a member function selectAll() on a non-object in C:\Program Files\xampp\htdocs\mySite\admin\listA.php on line 39
Thanks in advance to all of you!!