I need some help....how do I put information that I retrieved from a database into a tpl file?
This is what I have:
<html>
<body>
<?php
include 'class.FastTemplate.php';
$tpl = new FastTemplate('.');
$tpl->define(array('index'=>'index.tpl'));
$db = mysql_connect("localhost", "dbase", "pass");
mysql_select_db("dbase",$db);
$result = mysql_query("SELECT * FROM practice",$db);
printf("First Name: %s<br>\n", mysql_result($result,0,"name"));
printf("Last Name: %s<br>\n", mysql_result($result,0,"last"));
printf("Address: %s<br>\n", mysql_result($result,0,"email"));
printf("Position: %s<br>\n", mysql_result($result,0,"position"));
?>
</body>
</html>
Thanks