Reply to Re: Smarty and Sessions

Your name:

Reply:


Posted by Matthew Weier O'Phinney on 09/30/93 11:20

* "Jim MacDiarmid" <jim.macdiarmid@comcast.net>:
> 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/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация