Re: session_id() how to get?

From: Date: Thu, 21 Mar 2002 15:23:55 +0000
Subject: Re: session_id() how to get?
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3196@lists.php.net to get a copy of this message
Yes, if that works! Be careful if you are using caching though, you don't want to cache a page that prints a session_id. If you don't want it cached, you'll have to create an insert function. $url/?SID={insert name=session_id} programisci_listy wrote: > > On 21 marca 2002 at 15:50:14 > Monte Ohrt <monte@ispi.net> > wrote: > > > One solution would be to drop in a plugin: > > > function.sessionid.php > > ---------------------- > > > function smarty_function_sessionid() { > > echo session_id(); > > } > > But {$smarty.request.sid} is easer, isn't it? :) > > It is also interesting that all following do not work: > > {$smarty.get.sid} > {$smarty.post.sid} > {$smarty.cookies.sid} > {$smarty.server.sid} > {$smarty.env.sid} > {$smarty.session.sid} > > They return null. > > Only {$smarty.request.sid} gets session id. So it might be not true that > > <cite from="manual"> > {* display the variable "username" from merged get/post/cookies/server/env *} > {$smarty.request.username} > </cite> > > -- > Jarek -- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

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