sql_query("select * from text where id='profile'"); $item = $db->fetch_item("value"); $smarty->assign("text",$item); $db->sql_query("select * from pages order by position"); $smarty->assign("pages",$db->fetched_array()); $smarty->display("index.html"); ?>