Re: [SMARTY] Question about sessions

From: Date: Wed, 24 Jul 2002 18:59:56 +0000
Subject: Re: [SMARTY] Question about sessions
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5420@lists.php.net to get a copy of this message
In other words, is there a way to check if a variable is set in smarty? {isset $foo} ??? something like this ? I neeeeed it :-) Garland ----- Original Message ----- From: Garland foster <garland_foster@salutia.com> To: <smarty-general@lists.php.net> Sent: Wednesday, July 24, 2002 3:15 PM Subject: [SMARTY] Question about sessions Hi all, I want to know the best solution to check if a session variable is set, if I use {if $smarty.session.user eq 'admin'} Code for admin {else} Code for normal users {/if} Then I have a problem if error_reporting is set to all because the index user cannot be found in the compiled template. Ideas? Thanks, Garland.

« previous php.smarty.general (#5420) next »