Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

PHP isset in Smarty

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
arsenic205
Guest





PostPosted: Wed May 02, 2007 12:04 pm    Post subject: PHP isset in Smarty Reply with quote

How can I write this PHP statement in Smarty:
<?
if(isset($_SESSION['abc'])){
// do something
}
?>

and

<?
if(session_is_registered("xyz")){
// do something
}
?>
Back to top
Celeb
Administrator


Joined: 17 Apr 2007
Posts: 1025
Location: Vienna

PostPosted: Wed May 02, 2007 12:17 pm    Post subject: Reply with quote

{if isset($smarty.session.abc)} ... {/if}

http://smarty.php.net/manual/en/language.variables.smarty.php
http://smarty.php.net/manual/en/language.function.if.php
_________________
Darn computers always do what I tell them to instead of what I want them to do.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP