Here is the php file
<?php
require_once ('lib/config.inc.php');
require_once ('lib/smarty.php');
require_once ('lib/DataBase.php');
$n="shaz";
$p="pwd";
//Data Retrieving
$db = new DataBaseReader(DB_HOST, DB_NAME, DB_USER, DB_PASS);
try{
$db->connect();
$user = $db->login($n,$p);
if($user=="false")
echo "no login" ;
else
{ echo $user;
$_SESSION['sessUser']=$user;
}
}
catch(Exception $e){
echo "Exception: " . $e;
}
$db->disconnect(); //finally!!!
$smarty = new MyDir_Smarty();
$smarty->assign('user_type',$user);
$smarty->display('result.html');
mysql_close();
?>
This is this is result.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
{$user_type}
<frameset rows="80,*" frameborder="no" border="0" framespacing="0">
<frame src="topFrame.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
<frame src="mainFrame.html" name="mainFrame" id="mainFrame" title="mainFrame" />
</frameset>
<noframes><body>
</body>
</noframes></html>
if i run the html file on server it works fine but when i try to display it using smarty i get a blank page. i tried saving it as php but still it didn't work..tried saving as .tpl file but still got the same result. Can anyone please help.
Thanks