[SMARTY] Re: Smarty and Sessions

Matthew Weier O'Phinney <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
* "Jim MacDiarmid" <[email protected]>:
> I'm very new to Smarty so I'm hoping someone can help me.
>
> Can someone explain how the $smarty.session.user variable is set?  Is this
> something native to smarty or something unquie to the sample code I have?  

Smarty loads most of the superglobal variables (_GET, _POST, SESSION,
etc.) as keys of the $smarty variable. For $smarty.session to be set,
you'll need to call session_start() in the script that creates the
Smarty object. To make sure that $smarty.session.user is set, you'll
also need to set $_SESSION['user'] in that same script, or in a previous
script available in the same session.

-- 
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.