Hej
I´m trying to do a Webshop, we are using smarty-templates. I have a problem: in footer.php i would like to include a class querydatabase which contains queries for the database. I have tried to include the file in two ways: php-way and smarty-way. If I do it php I get an error which says that "failed open querydatabase". If I do it smarty I get a parse error. After this i would like to do an instance of the class but whatever I try nothing works. Please help me!
Below is the code...Thanks
/Henrik
<?php
session_start();
{include file="querydatabase.php"}
//include("querydatabase");
// Använd smarty
//require("Smarty.class.php");
//$smarty = new Smarty;
// varukorgsvariabler
$smarty->assign("varuKorgRegistered", session_is_registered("varuKorg"));
$smarty->assign("varuKorgRegistered", session_is_registered("notVaruKorg"));
// databas-uppkopplling
//$db = new database();
//$db->dbconnect();
//smarty->assign("queryDatabase");
// skapa ny instans av queryDatabase
$queryDatabase = new querydatabase();
//$smarty->assign("basketContent()", basketContent());
//$smarty->assign("unReg", unReg());
// övrigt
$smarty->assign("printLongLine", "-----------------------------------------------------------------");
$smarty->assign("totalSum", 0);
// Visa template-sida
$smarty->display("footer.tpl");
?>