refreshing required to see content
| From: | Darren Crotchett | Date: | Mon, 12 Feb 2007 18:21:12 +0000 |
| Subject: | refreshing required to see content | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-13681@lists.php.net to get a copy of this message | ||
I am having a problem implementing Pear::Auth with Smarty. My login
is working to the extent that I can put in valid information and it
will let me through. But, after providing valid credentials, I'm
just presented with a blank screen. I have to refresh the page to
see the content. Unfortunately, I'm new to Pear::Auth, too. And,
I'm not finding a lot of documentation on it.
I would very much appreciate some help with this.
Here's some code snippets (I'll try to provide enough, but not too
much):
(index.php)
if($homepage->checkAuth())
$homepage->displayLinks($homepage->getEntriesByCategory());
else
$homepage->displayLogin();
(mylibrary.php)
function displayLinks($data) {
// -- tpl is an instance of Homepage_Smarty which extends Smarty.
// -- $data in an array that my template parses
$this->tpl->assign('link', $data);
$this->tpl->display('index.tpl');
}
function displayLogin() {
/* show the authorization form */
$this->auth->start();
$this->tpl->display('index.tpl');
}
getEntriesByCategory() {
// this returns an array of results from a SQL query
// I don't think it important to this
}
TIA,
Darren
____________________________________________________________________________________
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front