<?php
/*
* test 4: first complete example, data from MySql
*
* It show how to build a report about the product sold over two year
*/
function foo()
{
return("text from foo");
}
function foop($text)
{
return("my parameter:".$text);
}
require_once('sptpl.inc');
require_once('sptpl_db.php');
require_once('sptpl_db_mysql.php');
$t=new sptpl();
$t->LoadTemplate('test4.xml');
$t->SetVar("RepTitle","Product sold from DB");
$t->run("test4.txt");
?>
|