hello guys can you help me on this, i am writting this
if(empty($_GET[page])) {
$template="home.tpl";
$smarty->assign('pagename', ' - Home');
}else {
$page = $_GET["page"];
switch ($page) {
case "home":
$template="home.tpl";
$smarty->assign('pagename', ' - Home');
break;
case "contact":
$template="contact.tpl";
$smarty->assign('pagename', ' - Contact us');
break;
case "verify":
$template="verify.tpl";
$smarty->assign('pagename', ' - Verify your account');
break;
default:
$template="404.tpl";
break;
}
}
$smarty->assign('sitename', $sitename);
$smarty->display($template);
What if I have "log-in" and "user area" and everything? How can I make them each do their own functions cleanly?